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

Sebastian Huber <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
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  : [email protected]
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.