This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2] Make some standard open() flags visible


On 10/10/2018 17:00, Corinna Vinschen wrote:
+/* POSIX-1.2008 specific flags */
+#if __POSIX_VISIBLE >= 200809
+#define	O_CLOEXEC	_FNOINHERIT
+#define	O_NOFOLLOW	_FNOFOLLOW
+#define	O_DIRECTORY	_FDIRECTORY
+#define	O_EXEC		_FEXECSRCH
+#define	O_SEARCH	_FEXECSRCH
+#endif
+
+#if __BSD_VISIBLE
+#define	O_DIRECT	_FDIRECT
+#endif
+
+#if defined (__CYGWIN__)
  #define O_BINARY	_FBINARY
  #define O_TEXT		_FTEXT
  #define O_DSYNC         _FSYNC
  #define O_RSYNC         _FSYNC
-#define O_EXEC          _FEXECSRCH
-#define O_SEARCH        _FEXECSRCH
-
-/* POSIX-1.2008 specific flags */
-#if __POSIX_VISIBLE >= 200809
Doesn't that require to #define _POSIX_C_SOURCE 200809L in your
libc/posix/opendir.c patch?


This POSIX standard is visible by default:

echo "#include <sys/cdefs.h>" > test.c
arm-rtems5-gcc -E test.c -o - -Wp,-dD | grep VISIBLE
#define __ATFILE_VISIBLE 1
#define __BSD_VISIBLE 1
#define __GNU_VISIBLE 0
#define __ISO_C_VISIBLE 2011
#define __LARGEFILE_VISIBLE 0
#define __MISC_VISIBLE 1
#define __POSIX_VISIBLE 200809
#define __SVID_VISIBLE 1
#define __XSI_VISIBLE 0

--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]