#include <fcntl.h>
+#include "options.h"
#define T(t) (t*)0;
#define F(t,n) {t *y = &x.n;}
#define C(n) switch(n){case n:;}
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)
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 <sys/stat.h>
#endif
static void g()
{
-int(*p_creat)(const char*,mode_t) = creat;
-int(*p_open)(const char*,int,...) = open;
-int(*p_openat)(int,const char*,int,...) = openat;
+{int(*p)(const char*,mode_t) = creat;}
+{int(*p)(const char*,int,...) = open;}
+{int(*p)(int,const char*,int,...) = openat;}
}