This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH,HURD]: Update posix_opt.h
- From: Roland McGrath <roland at redhat dot com>
- To: Samuel Thibault <samuel dot thibault at ens-lyon dot org>
- Cc: libc-alpha at sources dot redhat dot com
- Date: Tue, 5 Jan 2010 15:03:50 -0800 (PST)
- Subject: Re: [PATCH,HURD]: Update posix_opt.h
- References: <20100105223219.GN5087@const.famille.thibault.fr>
> /* Different Hurd filesystems might do these differently.
> You must query the particular file with `pathconf' or `fpathconf'. */
> -#undef _POSIX_CHOWN_RESTRICTED /* Only root can change owner of file? */
> -#undef _POSIX_NO_TRUNC /* Overlong file names get error? */
> -#undef _POSIX_SYNC_IO /* File supports O_SYNC et al? */
> +#define _POSIX_CHOWN_RESTRICTED 0 /* Only root can change owner of file? */
> +#define _POSIX_NO_TRUNC 0 /* Overlong file names get error? */
> +#define _POSIX_SYNCHRONIZED_IO 0 /* File supports O_SYNC et al? */
Did the specification for these change? If so, you should change that
comment too. If not, it is incorrect to #define these since they are not
in fact system-wide compile-time constants. They are chosen entirely by
the particular filesystem, so you really have to use pathconf to get the
true answers.
> +/* X/Open realtime support is not available. */
> +#define _XOPEN_REALTIME -1
> +
> +/* X/Open thread realtime support is available. */
^not
> +#define _XOPEN_REALTIME_THREADS -1
Why is -1 preferable to #undef for these?
Thanks,
Roland