[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gnulib] Argp compilation failure with _GNU_SOURCE and optimizat
Soeren D. Schulze
Re: [Bug-gnulib] Argp compilation failure with _GNU_SOURCE and optimization
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.