This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Make sys/timerfd.h usable without __USE_POSIX199309
- From: Ulrich Drepper <drepper at gmail dot com>
- To: Jonathan Nieder <jrnieder at gmail dot com>
- Cc: libc-alpha at sourceware dot org, Roland McGrath <roland at hack dot frob dot com>, Josh Triplett <josh at joshtriplett dot org>
- Date: Sun, 16 Oct 2011 10:39:13 -0400
- Subject: Re: [PATCH] Make sys/timerfd.h usable without __USE_POSIX199309
- References: <20110914033839.4277.94420.reportbug@leaf> <20110914050207.GA2884@elie><20111015064620.GA6603@elie.hsd1.il.comcast.net>
On Sat, Oct 15, 2011 at 02:46, Jonathan Nieder <jrnieder@gmail.com> wrote:
> Jonathan Nieder wrote:
>
>> How about this patch?
It's wrong. You're using a non-standard header which ideally would
not make anything available unless you select _GNU_SOURCE (or some
_BSD_SOURCE etc, but in this case the file is not of that origin).
It's just not worth it to add all these extra #ifdefs. Programmers
have to realize that without any _*_SOURCE macros defined the default
environment is ISO C and then you must not include any system headers
other than the standard headers.
Fix the relevant code that has problems.