autoconf: Header Portability

1 
1 5.6.1 Portability of Headers
1 ----------------------------
1 
1 This section documents some collected knowledge about common headers,
1 and the problems they cause.  By definition, this list always requires
1 additions.  A much more complete list is maintained by the Gnulib
DONTPRINTYET 1 project (⇒Gnulib), covering *notePosix Headers: (gnulib)Header
DONTPRINTYET 1DONTPRINTYET 1 project (⇒Gnulib), covering ⇒Posix Headers (gnulib)Header

 File Substitutes. and *noteGlibc Headers: (gnulib)Glibc Header File
1DONTPRINTYET 1DONTPRINTYET 1 project (⇒Gnulib), covering ⇒Posix Headers (gnulib)Header

 File Substitutes. and ⇒Glibc Headers (gnulib)Glibc Header File

 Substitutes.  Please help us keep the gnulib list as complete as
1 possible.
1 
1 `limits.h'
1      C99 says that `limits.h' defines `LLONG_MIN', `LLONG_MAX', and
1      `ULLONG_MAX', but many almost-C99 environments (e.g., default GCC
1      4.0.2 + glibc 2.4) do not define them.
1 
1 `inttypes.h' vs. `stdint.h'
1      The C99 standard says that `inttypes.h' includes `stdint.h', so
1      there's no need to include `stdint.h' separately in a standard
1      environment.  Some implementations have `inttypes.h' but not
1      `stdint.h' (e.g., Solaris 7), but we don't know of any
1      implementation that has `stdint.h' but not `inttypes.h'.
1 
1 `linux/irda.h'
1      It requires `linux/types.h' and `sys/socket.h'.
1 
1 `linux/random.h'
1      It requires `linux/types.h'.
1 
1 `net/if.h'
1      On Darwin, this file requires that `sys/socket.h' be included
1      beforehand.  One should run:
1 
1           AC_CHECK_HEADERS([sys/socket.h])
1           AC_CHECK_HEADERS([net/if.h], [], [],
1           [#include <stdio.h>
1           #ifdef STDC_HEADERS
1           # include <stdlib.h>
1           # include <stddef.h>
1           #else
1           # ifdef HAVE_STDLIB_H
1           #  include <stdlib.h>
1           # endif
1           #endif
1           #ifdef HAVE_SYS_SOCKET_H
1           # include <sys/socket.h>
1           #endif
1           ])
1 
1 `netinet/if_ether.h'
1      On Darwin, this file requires that `stdio.h' and `sys/socket.h' be
1      included beforehand.  One should run:
1 
1           AC_CHECK_HEADERS([sys/socket.h])
1           AC_CHECK_HEADERS([netinet/if_ether.h], [], [],
1           [#include <stdio.h>
1           #ifdef STDC_HEADERS
1           # include <stdlib.h>
1           # include <stddef.h>
1           #else
1           # ifdef HAVE_STDLIB_H
1           #  include <stdlib.h>
1           # endif
1           #endif
1           #ifdef HAVE_SYS_SOCKET_H
1           # include <sys/socket.h>
1           #endif
1           ])
1 
1 `stdint.h'
1      See above, item `inttypes.h' vs. `stdint.h'.
1 
1 `stdlib.h'
1      On many systems (e.g., Darwin), `stdio.h' is a prerequisite.
1 
1 `sys/mount.h'
1      On FreeBSD 4.8 on ia32 and using gcc version 2.95.4,
1      `sys/params.h' is a prerequisite.
1 
1 `sys/ptem.h'
1      On Solaris 8, `sys/stream.h' is a prerequisite.
1 
1 `sys/socket.h'
1      On Darwin, `stdlib.h' is a prerequisite.
1 
1 `sys/ucred.h'
1      On Tru64 5.1, `sys/types.h' is a prerequisite.
1 
1 `X11/extensions/scrnsaver.h'
1      Using XFree86, this header requires `X11/Xlib.h', which is probably
1      so required that you might not even consider looking for it.
1 
1           AC_CHECK_HEADERS([X11/extensions/scrnsaver.h], [], [],
1           [[#include <X11/Xlib.h>
1           ]])
1