bug-autoconf
[Top][All Lists]
Advanced

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

AC_INCLUDES_DEFAULT does not need to probe for headers that are part of


From: Zack Weinberg
Subject: AC_INCLUDES_DEFAULT does not need to probe for headers that are part of C89 or POSIX.1 anymore
Date: Wed, 4 Apr 2012 17:57:41 -0700

AC_INCLUDES_DEFAULT (which is used implicitly by a great many checks)
goes and checks for a bunch of headers that are either guaranteed to
exist by default on all platforms of interest nowadays, or guaranteed
to be *unnecessary* on all platforms of interest nowadays:  consider

AC_INIT(_, _, _)
AC_CHECK_HEADERS([dlfcn.h],,,[AC_INCLUDES_DEFAULT])
AC_CONFIG_HEADER([config.h])
AC_OUTPUT

which, as well as the desired check, does

checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes

The only tests in that list that are worth doing nowadays are for
stdint.h and inttypes.h, and I don't think they should be done
implicitly.

To put it another way, I think AC_INCLUDES_DEFAULT with no arguments
should expand to

          #include <sys/types.h>
          #include <sys/stat.h>
          #include <stdio.h>
          #include <stdlib.h>
          #include <stddef.h>
          #include <string.h>
          #include <unistd.h>

and should unconditionally assume that all of these headers exist.

zw



reply via email to

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