github.com/prattmic/llgo-embedded@v0.0.0-20150820070356-41cfecea0e1e/third_party/gofrontend/libgo/runtime/go-varargs.c (about) 1 /* go-varargs.c -- functions for calling C varargs functions. 2 3 Copyright 2013 The Go Authors. All rights reserved. 4 Use of this source code is governed by a BSD-style 5 license that can be found in the LICENSE file. */ 6 7 #include "config.h" 8 9 #include <sys/types.h> 10 #include <fcntl.h> 11 12 /* The syscall package calls C functions. The Go compiler can not 13 represent a C varargs functions. On some systems it's important 14 that the declaration of a function match the call. This function 15 holds non-varargs C functions that the Go code can call. */ 16 17 int 18 __go_open (char *path, int mode, mode_t perm) 19 { 20 return open (path, mode, perm); 21 } 22 23 int 24 __go_fcntl (int fd, int cmd, int arg) 25 { 26 return fcntl (fd, cmd, arg); 27 } 28 29 int 30 __go_fcntl_flock (int fd, int cmd, struct flock *arg) 31 { 32 return fcntl (fd, cmd, arg); 33 } 34 35 #ifdef HAVE_OPEN64 36 37 int 38 __go_open64 (char *path, int mode, mode_t perm) 39 { 40 return open64 (path, mode, perm); 41 } 42 43 #endif 44 45 #ifdef HAVE_OPENAT 46 47 int 48 __go_openat (int fd, char *path, int flags, mode_t mode) 49 { 50 return openat (fd, path, flags, mode); 51 } 52 53 #endif