This is the mail archive of the
mailing list for the Cygwin project.
Re: [Problem] mempcpy is missing?
Roger Sayle wrote:
>> As you have discovered, mempcpy is not provided. If a configure
>> script detects it, the configure script is broken.
> Thanks for the fast response. Unfortunately in your haste you may
> have missed the point of the e-mail.
> Cygwin's /usr/include/string.h prototypes mempcpy. If cygwin doesn't
> provide mempcpy then both the <string.h> header is broken, and the
> /usr/man/man3/mempcpy.3.gz man page should be removed.
> By inappropriately declaring the function prototype incompatibly this
> has broken libintl, and any other GNU package that depends upon it
> including gcc.
Background on why this happens:
Cygwin uses newlib as it's C library. The newlib functions are incorporated
into cygwin1.dll. But they are only exported if specifically listed in the
.def file - so when newlib adds a function, the headers propagate to Cygwin
automatically, but the function doesn't.
I've just looked at newlib's mempcpy.c - It says "<<mempcpy>> requires no
supporting OS subroutines.", and it is correct in saying this. Therefore,
unlike getsubopt, this *is* just a cygwin.din/version.h fix. (I've just
tested it) Will you make the required change? I don't know what the criteria
are for deciding whether to add a leading-underscore alias in cygwin.din.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html