bug-gnulib
[Top][All Lists]
Advanced

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

[bug-gnulib] mmap-anon.m4 problem


From: Mark D. Baushke
Subject: [bug-gnulib] mmap-anon.m4 problem
Date: Mon, 07 Mar 2005 08:11:45 -0800

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

The current m4/mmap-anon.m4 file contributes the following:

    AH_VERBATIM([MAP_FILE],
[/* Define MAP_FILE when it isn't otherwise.  */
#ifndef MAP_FILE
# define MAP_FILE 0
#endif
          
/* Define MAP_FAILED for old systems which neglect to.  */
#ifndef MAP_FAILED
# define MAP_FAILED ((void *)-1)
#endif])

The problem is that on a FreeBSD 4.2-RELEASE system this will lead to
a warning when compiling pagealign_alloc.c

In file included from pagealign_alloc.c:40:
/usr/include/sys/mman.h:100: warning: `MAP_FILE' redefined
../config.h:767: warning: this is the location of the previous definition   

because config.h is included before the <sys/mman.h> file the macros are
always defined by the AH_VERBATIM code.

I would suggest it would be prudent to define MAP_FILE and MAP_FAILED
only when they are not already defined in any header files.

        Thanks,
        -- Mark
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)

iD8DBQFCLH1B3x41pRYZE/gRAqh/AJ4jNYrMMes3MYeUoG0A6z5xuKntSACgwhK9
TPleqUU7kqSlsWA3unyuFYw=
=Gvgu
-----END PGP SIGNATURE-----




reply via email to

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