bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

memset.c needs #include <config.h>?


From: Ben Pfaff
Subject: memset.c needs #include <config.h>?
Date: Sun, 04 Feb 2007 20:20:08 -0800
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)

Most non-trivial .c files in gnulib's lib directory include
config.h, but some do not.  One that is causing problems for
compiling GNU PSPP in some environments is memmem.c.  This file
includes gnulib's replacement <string.h>, which uses restrict.
If this is compiled on a system that lacks support for the C99
restrict keyword, on which config.h defines "restrict" out of
existence, it fails because the compiler still sees the uses of
restrict.

I assume the memmem.c problem should be fixed just by including
<config.h>.  Using "fgrep -L config.h lib/*.c" I see there are
others that might be a problem, too, but this is the one that is
causing problems for PSPP right now.

Thanks for gnulib!
-- 
Ben Pfaff 
address@hidden
http://benpfaff.org





reply via email to

[Prev in Thread] Current Thread [Next in Thread]