X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fapi%2Ffcntl.c;h=bd1d8ddd43963059d4335bd633fa3d06efe87c4f;hb=87b251552f58323aa76828de607e8e335f3c8467;hp=ca58523ee3ac757434729fb731dcb7dbcde17fdf;hpb=e19254b50664a2ab71251d66bd5547492df52191;p=libc-test diff --git a/src/api/fcntl.c b/src/api/fcntl.c index ca58523..bd1d8dd 100644 --- a/src/api/fcntl.c +++ b/src/api/fcntl.c @@ -1,4 +1,5 @@ #include +#include "options.h" #define T(t) (t*)0; #define F(t,n) {t *y = &x.n;} #define C(n) switch(n){case n:;} @@ -28,9 +29,11 @@ C(O_NOCTTY) C(O_TRUNC) C(O_TTY_INIT) C(O_APPEND) -C(O_DSYNC) C(O_NONBLOCK) +#ifdef POSIX_SYNCHRONIZED_IO +C(O_DSYNC) C(O_RSYNC) +#endif C(O_SYNC) C(O_ACCMODE) C(O_EXEC) @@ -83,13 +86,16 @@ T(mode_t) T(off_t) T(pid_t) -int(*p_fcntl)(int,int,...) = fcntl; -int(*p_posix_fadvise)(int,off_t,off_t,int) = posix_fadvise; -int(*p_posix_fallocate)(int,off_t,off_t) = posix_fallocate; +{int(*p)(int,int,...) = fcntl;} +{int(*p)(int,off_t,off_t,int) = posix_fadvise;} +{int(*p)(int,off_t,off_t) = posix_fallocate;} +} #ifndef _XOPEN_SOURCE #include #endif -int(*p_creat)(const char*,mode_t) = creat; -int(*p_open)(const char*,int,...) = open; -int(*p_openat)(int,const char*,int,...) = openat; +static void g() +{ +{int(*p)(const char*,mode_t) = creat;} +{int(*p)(const char*,int,...) = open;} +{int(*p)(int,const char*,int,...) = openat;} }