66,9 → 66,8 |
#define _O_BINARY O_BINARY |
#define _O_RAW O_BINARY |
#define _O_NOINHERIT O_NOINHERIT |
#if __MISC_VISIBLE |
|
#ifndef _POSIX_SOURCE |
|
/* |
* Flags that work for fcntl(fd, F_SETFL, FXXXX) |
*/ |
99,7 → 98,7 |
#define FEXCL _FEXCL |
#define FNOCTTY _FNOCTTY |
|
#endif /* !_POSIX_SOURCE */ |
#endif /* __MISC_VISIBLE */ |
|
/* XXX close on exec request; must match UF_EXCLOSE in user.h */ |
#define FD_CLOEXEC 1 /* posix */ |
110,20 → 109,20 |
#define F_SETFD 2 /* Set fildes flags (close on exec) */ |
#define F_GETFL 3 /* Get file flags */ |
#define F_SETFL 4 /* Set file flags */ |
#ifndef _POSIX_SOURCE |
#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 |
#define F_GETOWN 5 /* Get owner - for ASYNC */ |
#define F_SETOWN 6 /* Set owner - for ASYNC */ |
#endif /* !_POSIX_SOURCE */ |
#endif /* __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 */ |
#define F_GETLK 7 /* Get record-locking information */ |
#define F_SETLK 8 /* Set or Clear a record-lock (Non-Blocking) */ |
#define F_SETLKW 9 /* Set or Clear a record-lock (Blocking) */ |
#ifndef _POSIX_SOURCE |
#if __MISC_VISIBLE |
#define F_RGETLK 10 /* Test a remote lock to see if it is blocked */ |
#define F_RSETLK 11 /* Set or unlock a remote lock */ |
#define F_CNVT 12 /* Convert a fhandle to an open fd */ |
#define F_RSETLKW 13 /* Set or Clear remote record-lock(Blocking) */ |
#endif /* !_POSIX_SOURCE */ |
#ifdef __CYGWIN__ |
#endif /* __MISC_VISIBLE */ |
#if __POSIX_VISIBLE >= 200809 |
#define F_DUPFD_CLOEXEC 14 /* As F_DUPFD, but set close-on-exec flag */ |
#endif |
|
131,11 → 130,11 |
#define F_RDLCK 1 /* read lock */ |
#define F_WRLCK 2 /* write lock */ |
#define F_UNLCK 3 /* remove lock(s) */ |
#ifndef _POSIX_SOURCE |
#if __MISC_VISIBLE |
#define F_UNLKSYS 4 /* remove remote locks for a given system */ |
#endif /* !_POSIX_SOURCE */ |
#endif /* __MISC_VISIBLE */ |
|
#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 || defined(__CYGWIN__) |
#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 |
/* Special descriptor value to denote the cwd in calls to openat(2) etc. */ |
#define AT_FDCWD -2 |
|
168,7 → 167,7 |
}; |
#endif /* __CYGWIN__ */ |
|
#ifndef _POSIX_SOURCE |
#if __MISC_VISIBLE |
/* extended file segment locking set data type */ |
struct eflock { |
short l_type; /* F_RDLCK, F_WRLCK, or F_UNLCK */ |
180,13 → 179,13 |
long l_rpid; /* Remote process id wanting this lock */ |
long l_rsys; /* Remote system id wanting this lock */ |
}; |
#endif /* !_POSIX_SOURCE */ |
#endif /* __MISC_VISIBLE */ |
|
#include <sys/types.h> |
#include <sys/stat.h> /* sigh. for the mode bits for open/creat */ |
|
extern int open _PARAMS ((const char *, int, ...)); |
#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 || defined(__CYGWIN__) |
#if __ATFILE_VISIBLE |
extern int openat _PARAMS ((int, const char *, int, ...)); |
#endif |
extern int creat _PARAMS ((const char *, mode_t)); |
194,7 → 193,7 |
#if __BSD_VISIBLE |
extern int flock _PARAMS ((int, int)); |
#endif |
#ifdef __CYGWIN__ |
#if __GNU_VISIBLE |
#include <sys/time.h> |
extern int futimesat _PARAMS ((int, const char *, const struct timeval *)); |
#endif |