bug-autoconf
[Top][All Lists]
Advanced

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

AC_FUNC_MEMMEM


From: Peter Miller
Subject: AC_FUNC_MEMMEM
Date: Thu, 28 Jun 2007 15:29:06 +1000

The man page for memmem(1) details numerous bugs found in previous
versions of gnu libc:

        This function was broken in Linux libraries up to and including
        libc 5.0.9;  there the ‘needle’ and ‘haystack’ arguments were
        interchanged, and a pointer to the end of the first  occurrence
        of  needle  was returned.  Since libc 5.0.9 is still widely
        used, this is a dangerous function to use.  Both old and new
        libc’s have the bug that if needle is empty haystack-1 (instead
        of  haystack) is returned.  And glibc 2.0 makes it worse, and
        returns a pointer to the last byte of ‘haystack’.  This is fixed
        in glibc 2.1.

It would be very helpful if GNU Autoconf had a AC_FUNC_MEMMEM macro to
detect correct memmem(3) implementations.


Regards
Peter Miller <address@hidden>
/\/\*        http://miller.emu.id.au/pmiller/

PGP public key ID: 1024D/D0EDB64D
fingerprint = AD0A C5DF C426 4F03 5D53  2BDB 18D8 A4E2 D0ED B64D
See http://www.keyserver.net or any PGP keyserver for public key.

"I consider C++ the most significant technical hazard to the survival of
your project and do so without apologies." -- Alistair Cockburn

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

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