1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-02 12:20:51 +00:00

fcntl.h: Make visible various POSIX.1-2008 features.

Also, remove #if __BSD_VISIBLE where it is redundant. When __BSD_VISIBLE is
defined to 1, __POSIX_VISIBLE, __XSI_VISIBLE and __ISO_C_VISIBLE are also
defined to the newest supported version.

PR:		188173
Reviewed by:	pluknet
This commit is contained in:
Jilles Tjoelker 2014-04-17 21:29:22 +00:00
parent 3bad806bc9
commit edc63b46e0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=264628

View File

@ -96,7 +96,7 @@ typedef __pid_t pid_t;
#define O_FSYNC 0x0080 /* synchronous writes */
#endif
#define O_SYNC 0x0080 /* POSIX synonym for O_FSYNC */
#if __BSD_VISIBLE
#if __POSIX_VISIBLE >= 200809
#define O_NOFOLLOW 0x0100 /* don't follow symlinks */
#endif
#define O_CREAT 0x0200 /* create if nonexistent */
@ -114,8 +114,7 @@ typedef __pid_t pid_t;
#define O_DIRECT 0x00010000
#endif
/* Defined by POSIX Extended API Set Part 2 */
#if __BSD_VISIBLE
#if __POSIX_VISIBLE >= 200809
#define O_DIRECTORY 0x00020000 /* Fail if not directory */
#define O_EXEC 0x00040000 /* Open for execute only */
#endif
@ -183,8 +182,7 @@ typedef __pid_t pid_t;
#define FRDAHEAD O_CREAT
#endif
/* Defined by POSIX Extended API Set Part 2 */
#if __BSD_VISIBLE
#if __POSIX_VISIBLE >= 200809
/*
* Magic value that specify the use of the current working directory
* to determine the target of relative file paths in the openat() and
@ -211,7 +209,7 @@ typedef __pid_t pid_t;
#define F_SETFD 2 /* set file descriptor flags */
#define F_GETFL 3 /* get file status flags */
#define F_SETFL 4 /* set file status flags */
#if __BSD_VISIBLE || __XSI_VISIBLE || __POSIX_VISIBLE >= 200112
#if __XSI_VISIBLE || __POSIX_VISIBLE >= 200112
#define F_GETOWN 5 /* get SIGIO/SIGURG proc/pgrp */
#define F_SETOWN 6 /* set SIGIO/SIGURG proc/pgrp */
#endif
@ -229,7 +227,7 @@ typedef __pid_t pid_t;
#define F_READAHEAD 15 /* read ahead */
#define F_RDAHEAD 16 /* Darwin compatible read ahead */
#endif
#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809
#if __POSIX_VISIBLE >= 200809
#define F_DUPFD_CLOEXEC 17 /* Like F_DUPFD, but FD_CLOEXEC is set */
#endif
#if __BSD_VISIBLE
@ -310,10 +308,10 @@ int fcntl(int, int, ...);
#if __BSD_VISIBLE
int flock(int, int);
#endif
#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809
#if __POSIX_VISIBLE >= 200809
int openat(int, const char *, int, ...);
#endif
#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112
#if __POSIX_VISIBLE >= 200112
int posix_fadvise(int, off_t, off_t, int);
int posix_fallocate(int, off_t, off_t);
#endif