|
nsz |
e19254 |
#include <fcntl.h>
|
|
nsz |
e19254 |
#define T(t) (t*)0;
|
|
nsz |
e19254 |
#define F(t,n) {t *y = &x.;;}
|
|
nsz |
e19254 |
#define C(n) switch(n){case n:;}
|
|
nsz |
e19254 |
static void f()
|
|
nsz |
e19254 |
{
|
|
nsz |
e19254 |
C(F_DUPFD)
|
|
nsz |
e19254 |
C(F_DUPFD_CLOEXEC)
|
|
nsz |
e19254 |
C(F_GETFD)
|
|
nsz |
e19254 |
C(F_SETFD)
|
|
nsz |
e19254 |
C(F_GETFL)
|
|
nsz |
e19254 |
C(F_SETFL)
|
|
nsz |
e19254 |
C(F_GETLK)
|
|
nsz |
e19254 |
C(F_SETLK)
|
|
nsz |
e19254 |
C(F_SETLKW)
|
|
nsz |
e19254 |
C(F_GETOWN)
|
|
nsz |
e19254 |
C(F_SETOWN)
|
|
nsz |
e19254 |
C(FD_CLOEXEC)
|
|
nsz |
e19254 |
C(F_RDLCK)
|
|
nsz |
e19254 |
C(F_UNLCK)
|
|
nsz |
e19254 |
C(F_WRLCK)
|
|
nsz |
e19254 |
C(SEEK_SET)
|
|
nsz |
e19254 |
C(SEEK_CUR)
|
|
nsz |
e19254 |
C(SEEK_END)
|
|
nsz |
e19254 |
C(O_CREAT)
|
|
nsz |
e19254 |
C(O_EXCL)
|
|
nsz |
e19254 |
C(O_NOCTTY)
|
|
nsz |
e19254 |
C(O_TRUNC)
|
|
nsz |
e19254 |
C(O_TTY_INIT)
|
|
nsz |
e19254 |
C(O_APPEND)
|
|
nsz |
e19254 |
C(O_DSYNC)
|
|
nsz |
e19254 |
C(O_NONBLOCK)
|
|
nsz |
e19254 |
C(O_RSYNC)
|
|
nsz |
e19254 |
C(O_SYNC)
|
|
nsz |
e19254 |
C(O_ACCMODE)
|
|
nsz |
e19254 |
C(O_EXEC)
|
|
nsz |
e19254 |
C(O_RDONLY)
|
|
nsz |
e19254 |
C(O_RDWR)
|
|
nsz |
e19254 |
C(O_SEARCH)
|
|
nsz |
e19254 |
C(O_WRONLY)
|
|
nsz |
e19254 |
C(S_IRWXU)
|
|
nsz |
e19254 |
C(S_IRUSR)
|
|
nsz |
e19254 |
C(S_IWUSR)
|
|
nsz |
e19254 |
C(S_IXUSR)
|
|
nsz |
e19254 |
C(S_IRWXG)
|
|
nsz |
e19254 |
C(S_IRGRP)
|
|
nsz |
e19254 |
C(S_IWGRP)
|
|
nsz |
e19254 |
C(S_IXGRP)
|
|
nsz |
e19254 |
C(S_IRWXO)
|
|
nsz |
e19254 |
C(S_IROTH)
|
|
nsz |
e19254 |
C(S_IWOTH)
|
|
nsz |
e19254 |
C(S_IXOTH)
|
|
nsz |
e19254 |
C(S_ISUID)
|
|
nsz |
e19254 |
C(S_ISGID)
|
|
nsz |
e19254 |
#ifdef _XOPEN_SOURCE
|
|
nsz |
e19254 |
C(S_ISVTX)
|
|
nsz |
e19254 |
#endif
|
|
nsz |
e19254 |
C(AT_FDCWD)
|
|
nsz |
e19254 |
C(AT_EACCESS)
|
|
nsz |
e19254 |
C(AT_SYMLINK_NOFOLLOW)
|
|
nsz |
e19254 |
C(AT_SYMLINK_FOLLOW)
|
|
nsz |
e19254 |
C(O_CLOEXEC)
|
|
nsz |
e19254 |
C(O_DIRECTORY)
|
|
nsz |
e19254 |
C(O_NOFOLLOW)
|
|
nsz |
e19254 |
C(AT_REMOVEDIR)
|
|
nsz |
e19254 |
C(POSIX_FADV_DONTNEED)
|
|
nsz |
e19254 |
C(POSIX_FADV_NOREUSE)
|
|
nsz |
e19254 |
C(POSIX_FADV_NORMAL)
|
|
nsz |
e19254 |
C(POSIX_FADV_RANDOM)
|
|
nsz |
e19254 |
C(POSIX_FADV_SEQUENTIAL)
|
|
nsz |
e19254 |
C(POSIX_FADV_WILLNEED)
|
|
nsz |
e19254 |
|
|
nsz |
e19254 |
{
|
|
nsz |
e19254 |
struct flock x;
|
|
nsz |
e19254 |
F(short, l_type)
|
|
nsz |
e19254 |
F(short, l_whence)
|
|
nsz |
e19254 |
F(off_t, l_start)
|
|
nsz |
e19254 |
F(off_t, l_len)
|
|
nsz |
e19254 |
F(pid_t, l_pid)
|
|
nsz |
e19254 |
}
|
|
nsz |
e19254 |
|
|
nsz |
e19254 |
T(mode_t)
|
|
nsz |
e19254 |
T(off_t)
|
|
nsz |
e19254 |
T(pid_t)
|
|
nsz |
e19254 |
|
|
nsz |
0ef264 |
{int(*p)(int,int,...) = fcntl;}
|
|
nsz |
0ef264 |
{int(*p)(int,off_t,off_t,int) = posix_fadvise;}
|
|
nsz |
0ef264 |
{int(*p)(int,off_t,off_t) = posix_fallocate;}
|
|
nsz |
b80923 |
}
|
|
nsz |
e19254 |
#ifndef _XOPEN_SOURCE
|
|
nsz |
e19254 |
#include <sys/stat.h>
|
|
nsz |
e19254 |
#endif
|
|
nsz |
b80923 |
static void g()
|
|
nsz |
b80923 |
{
|
|
nsz |
0ef264 |
{int(*p)(const char*,mode_t) = creat;}
|
|
nsz |
0ef264 |
{int(*p)(const char*,int,...) = open;}
|
|
nsz |
0ef264 |
{int(*p)(int,const char*,int,...) = openat;}
|
|
nsz |
e19254 |
}
|