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 Oct 10 15:32, Sebastian Huber wrote:
> Make the POSIX O_CLOEXEC, O_NOFOLLOW, O_DIRECTORY, O_EXEC, and O_SEARCH
> open() flags available also to non-Cygwin systems.
> 
> Make the BSD/glibc O_DIRECT open() flag  available also to non-Cygwin
> systems.

LGTM, but one last question.

> +/* 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?

> -#define O_CLOEXEC	_FNOINHERIT
> -#define O_NOFOLLOW      _FNOFOLLOW
> -#define O_DIRECTORY     _FDIRECTORY
> -#endif
>  
>  /* Linux-specific flags */
>  #if __GNU_VISIBLE
> -#define O_DIRECT        _FDIRECT
>  #define O_TMPFILE	_FTMPFILE
>  #define O_NOATIME	_FNOATIME
>  #endif
> -- 
> 2.16.4


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

Attachment: signature.asc
Description: PGP signature


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