Always suppress libc-internal declarations for C++ code.
Commit Message
On Sun, Nov 27, 2016 at 1:50 AM, Mike Frysinger <vapier@gentoo.org> wrote:
> On 21 Nov 2016 12:42, Zack Weinberg wrote:
>> This flushed out some minor problems: test-skeleton.c uses uintptr_t
>> but wasn't including <stdint.h>
>
> seems like this should be installed as obvious by itself
Done (patch appended)
>> libio.h tested _GNU_SOURCE instead of __USE_GNU in one place.
>
> makes sense regardless too
Also done
> a quick grep shows fnmatch.h has a similar error
Isn't fnmatch.h shared with gnulib? I don't feel like I understand
the constraints on code shared with gnulib, certainly not enough to
call it "obvious." Also, some of the conditionals in there don't make
sense to me ("#if !defined _POSIX_C_SOURCE || _POSIX_C_SOURCE < 2 ||
defined _GNU_SOURCE" -- what's that even supposed to do?)
zw
* libio/libio.h: Use __USE_GNU, not _GNU_SOURCE, in a conditional.
* test-skeleton.c: Include stdint.h to ensure uintptr_t is available.
Comments
On 27 Nov 2016 12:37, Zack Weinberg wrote:
> On Sun, Nov 27, 2016 at 1:50 AM, Mike Frysinger <vapier@gentoo.org> wrote:
> > On 21 Nov 2016 12:42, Zack Weinberg wrote:
> >> This flushed out some minor problems: test-skeleton.c uses uintptr_t
> >> but wasn't including <stdint.h>
> >
> > seems like this should be installed as obvious by itself
>
> Done (patch appended)
>
> >> libio.h tested _GNU_SOURCE instead of __USE_GNU in one place.
> >
> > makes sense regardless too
>
> Also done
these two patches look fine
> > a quick grep shows fnmatch.h has a similar error
>
> Isn't fnmatch.h shared with gnulib? I don't feel like I understand
> the constraints on code shared with gnulib, certainly not enough to
> call it "obvious." Also, some of the conditionals in there don't make
> sense to me ("#if !defined _POSIX_C_SOURCE || _POSIX_C_SOURCE < 2 ||
> defined _GNU_SOURCE" -- what's that even supposed to do?)
i've sent a sep patch for that so we can discuss it there ;)
-mike
@@ -353,7 +353,7 @@ typedef int __io_seek_fn
typedef int __io_close_fn (void *__cookie);
-#ifdef _GNU_SOURCE
+#ifdef __USE_GNU
/* User-visible names for the above. */
typedef __io_read_fn cookie_read_function_t;
typedef __io_write_fn cookie_write_function_t;
@@ -33,6 +33,7 @@
#include <sys/wait.h>
#include <sys/param.h>
#include <time.h>
+#include <stdint.h>
/* The test function is normally called `do_test' and it is called
with argc and argv as the arguments. We nevertheless provide the