bug-gnulib
[Top][All Lists]
Advanced

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

Re: proposed 'string' module for gnulib


From: Eric Blake
Subject: Re: proposed 'string' module for gnulib
Date: Fri, 2 Feb 2007 16:48:33 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Paul Eggert <eggert <at> CS.UCLA.EDU> writes:

> I'd like to add a 'string' module to gnulib, which does for <string.h>
> what the sys_time module does for <sys/time.h>, namely, sets up a
> substitute string.h that has needed GNU declarations.  That way,
> we don't need to worry about the little include files like "strstr.h"
> which make the rest of the code harder to read and maintain.

> Index: lib/strchrnul.c
> ===================================================================
> RCS file: /cvsroot/gnulib/gnulib/lib/strchrnul.c,v
> retrieving revision 1.4
> diff -u -p -r1.4 strchrnul.c
> --- lib/strchrnul.c   14 May 2005 06:03:58 -0000      1.4
> +++ lib/strchrnul.c   26 Jan 2007 07:40:05 -0000
>  <at>  <at>  -16,7 +16,7  <at>  <at> 
>     Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
> 
>  /* Specification.  */
> -#include "strchrnul.h"
> +#include <string.h>

Oops - this doesn't pick up <config.h>, and caused a failure on cygwin 
compiling tar using gcc 3.4.4:

In file included from strchrnul.c:19:
./string.h:96: error: parse error before "__dst"
make[3]: *** [strchrnul.o] Error 1

Fixed thusly:

2007-02-02  Eric Blake  <address@hidden>

        * lib/strchrnul.c: Always include config.h first.

Index: lib/strchrnul.c
===================================================================
RCS file: /sources/gnulib/gnulib/lib/strchrnul.c,v
retrieving revision 1.5
diff -u -r1.5 strchrnul.c
--- lib/strchrnul.c     26 Jan 2007 22:16:55 -0000      1.5
+++ lib/strchrnul.c     2 Feb 2007 16:46:55 -0000
@@ -15,6 +15,8 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
+#include <config.h>
+
 /* Specification.  */
 #include <string.h>
 







reply via email to

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