bug-gnulib
[Top][All Lists]
Advanced

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

strnlen.h


From: Mark D. Baushke
Subject: strnlen.h
Date: Thu, 07 Sep 2006 12:48:00 -0700

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I am confused about why some code does this:

#if defined HAVE_DECL_STRNLEN && !HAVE_DECL_STRNLEN

and other code does this:

#if !HAVE_DECL_GETADDRINFO

If you must check for it being defined, wouldn't this form

#if !defined HAVE_DECL_STRNLEN || !HAVE_DECL_STRNLEN

be more correct?

There are similar constructs in these files:

    argp-namefrob.h
    getpass.h
    memmem.h
    snprintf.h
    strdup.h
    strtok_r.h
    timegm.h
    vsnprintf.h

I know that the current configure script appears to generate either a

    #define HAVE_DECL_STRNLEN 0
or
    #define HAVE_DECL_STRNLEN 1

but is that the case for all HAVE_DECL_* macros?

        Curious,
        -- Mark
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (FreeBSD)

iD8DBQFFAHdwCg7APGsDnFERAn/7AKDAyWLABLSOcaN/OC8XLxhbIdOQMACZAYR/
PC1lrIx+C/XwqZMxuijnKvQ=
=H8g9
-----END PGP SIGNATURE-----




reply via email to

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