[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: Soeren D. Schulze
Subject: Re: [Bug-gnulib] Argp compilation failure with _GNU_SOURCE and optimization
Date: Sun, 12 Sep 2004 12:55:35 +0200

Paul Eggert wrote:
> "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:


I do not think the real bug is in mempcpy.h.
Please read the complete mail:

In context, I use the Argp gnulib module in my project and call gl_ARGP
in configure.ac.  I had been surprised about m4/argp.m4 anyway, because
it does not even check if Argp is present.
mempcpy.h itself contains a check for HAVE_MEMPCPY and strndup.h checks
for HAVE_STRNDUP, but neither gl_FUNC_MEMPCPY nor gl_FUNC_STRNDUP are
required by gl_ARGP.

Checking if `mempcpy' is defined as a macro is inappropriate because
this is implementation-specific.  Moreover, you forgot strndup.h.

Better include something like AC_REQUIRE([gl_FUNC_MEMPCPY]) and
AC_REQUIRE([gl_FUNC_STRNDUP]) in argp.m4.  (You know better how to do
this exactly, probably.)
Then HAVE_MEMPCPY in mempcpy.h and HAVE_STRNDUP in strndup.h will work.


Soeren Schulze

reply via email to

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