mirror of
https://github.com/postgres/postgres.git
synced 2025-10-12 07:05:03 +03:00
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.
This commit is contained in:
@@ -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
|
||||
|
@@ -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
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user