diff options
| author | Tom Lane | 2017-02-25 23:10:09 +0000 |
|---|---|---|
| committer | Tom Lane | 2017-02-25 23:10:09 +0000 |
| commit | 2bd7f85796ec373ecae61dd480437b3e668ec883 (patch) | |
| tree | f4f137a5e74b3e0583178fd4078d2f94427fe48b /config | |
| parent | 9e3755ecb2d058f7d123dd35a2e1784006190962 (diff) | |
Remove some configure header-file checks that we weren't really using.
We had some AC_CHECK_HEADER tests that were really wastes of cycles,
because the code proceeded to #include those headers unconditionally
anyway, in all or a large majority of cases. The lack of complaints
shows that those headers are available on every platform of interest,
so we might as well let configure run a bit faster by not probing
those headers at all.
I suspect that some of the tests I left alone are equally useless, but
since all the existing #includes of the remaining headers are properly
guarded, I didn't touch them.
Diffstat (limited to 'config')
| -rw-r--r-- | config/ac_func_accept_argtypes.m4 | 9 | ||||
| -rw-r--r-- | config/c-library.m4 | 10 |
2 files changed, 6 insertions, 13 deletions
diff --git a/config/ac_func_accept_argtypes.m4 b/config/ac_func_accept_argtypes.m4 index e57f3e6f00..ee28bacf4b 100644 --- a/config/ac_func_accept_argtypes.m4 +++ b/config/ac_func_accept_argtypes.m4 @@ -14,9 +14,6 @@ dnl #define ACCEPT_TYPE_ARG1 int dnl #define ACCEPT_TYPE_ARG2 struct sockaddr * dnl #define ACCEPT_TYPE_ARG3 socklen_t dnl -dnl This macro requires AC_CHECK_HEADERS to have already verified the -dnl presence or absence of sys/types.h and sys/socket.h. -dnl dnl NOTE: This is just a modified version of the AC_FUNC_SELECT_ARGTYPES dnl macro. Credit for that one goes to David MacKenzie et. al. dnl @@ -51,12 +48,8 @@ AC_DEFUN([AC_FUNC_ACCEPT_ARGTYPES], for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do AC_COMPILE_IFELSE([AC_LANG_SOURCE( -[#ifdef HAVE_SYS_TYPES_H -#include <sys/types.h> -#endif -#ifdef HAVE_SYS_SOCKET_H +[#include <sys/types.h> #include <sys/socket.h> -#endif extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);])], [ac_not_found=no; break 4], [ac_not_found=yes]) done diff --git a/config/c-library.m4 b/config/c-library.m4 index 4ff8dae141..9c2207b03d 100644 --- a/config/c-library.m4 +++ b/config/c-library.m4 @@ -111,8 +111,12 @@ fi AC_DEFUN([PGAC_UNION_SEMUN], [AC_CHECK_TYPES([union semun], [], [], [#include <sys/types.h> +#ifdef HAVE_SYS_IPC_H #include <sys/ipc.h> -#include <sys/sem.h>])])# PGAC_UNION_SEMUN +#endif +#ifdef HAVE_SYS_SEM_H +#include <sys/sem.h> +#endif])])# PGAC_UNION_SEMUN # PGAC_STRUCT_SOCKADDR_UN @@ -135,9 +139,7 @@ AC_DEFUN([PGAC_STRUCT_SOCKADDR_UN], AC_DEFUN([PGAC_STRUCT_SOCKADDR_STORAGE], [AC_CHECK_TYPES([struct sockaddr_storage], [], [], [#include <sys/types.h> -#ifdef HAVE_SYS_SOCKET_H #include <sys/socket.h> -#endif ])])# PGAC_STRUCT_SOCKADDR_STORAGE # PGAC_STRUCT_SOCKADDR_STORAGE_MEMBERS @@ -154,9 +156,7 @@ AC_DEFUN([PGAC_STRUCT_SOCKADDR_STORAGE_MEMBERS], struct sockaddr_storage.__ss_len, struct sockaddr.sa_len], [], [], [#include <sys/types.h> -#ifdef HAVE_SYS_SOCKET_H #include <sys/socket.h> -#endif ])])# PGAC_STRUCT_SOCKADDR_STORAGE_MEMBERS |
