[Top][All Lists]

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

Re: [Bug-gnulib] Argp compilation failure with _GNU_SOURCE and optimizat

From: Paul Eggert
Subject: Re: [Bug-gnulib] Argp compilation failure with _GNU_SOURCE and optimization
Date: Sat, 11 Sep 2004 15:55:26 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

"Soeren D. Schulze" <address@hidden> writes:

>> Does it fix things if you insert this line at the start of mempcpy.h:
>>   #ifndef mempcpy
>> and append this line to the end of that file?
>>   #endif
> Yes, it does.

OK, thanks, I installed this obvious patch:

2004-09-11  Paul Eggert  <address@hidden>

        * mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
        in case some system header has #define'd it.  Problem reported by
        Soeren D. Schulze in

Index: mempcpy.h
RCS file: /cvsroot/gnulib/gnulib/lib/mempcpy.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -p -u -r1.1 -r1.2
--- mempcpy.h   14 Jul 2003 18:50:59 -0000      1.1
+++ mempcpy.h   11 Sep 2004 22:54:43 -0000      1.2
@@ -1,5 +1,5 @@
 /* Copy memory area and return pointer after last written byte.
-   Copyright (C) 2003 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2004 Free Software Foundation, Inc.
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -15,18 +15,22 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+#ifndef mempcpy
 /* Get mempcpy() declaration.  */
-#include <string.h>
+#  include <string.h>
+# else
 /* Get size_t */
-#include <stddef.h>
+#  include <stddef.h>
 /* Copy N bytes of SRC to DEST, return pointer to bytes after the
    last written byte.  */
 extern void *mempcpy (void *dest, const void *src, size_t n);
+# endif

reply via email to

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