Author: jilles
Date: Thu Apr 17 21:29:22 2014
New Revision: 264628
URL: http://svnweb.freebsd.org/changeset/base/264628

Log:
  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

Modified:
  head/sys/sys/fcntl.h

Modified: head/sys/sys/fcntl.h
==============================================================================
--- head/sys/sys/fcntl.h        Thu Apr 17 20:48:32 2014        (r264627)
+++ head/sys/sys/fcntl.h        Thu Apr 17 21:29:22 2014        (r264628)
@@ -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
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to