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
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
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
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
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
## Header files
##
-for ac_header in atomic.h crypt.h dld.h fp_class.h getopt.h ieeefp.h ifaddrs.h langinfo.h mbarrier.h poll.h pwd.h sys/epoll.h sys/ioctl.h sys/ipc.h sys/poll.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/socket.h sys/sockio.h sys/tas.h sys/time.h sys/un.h termios.h ucred.h utime.h wchar.h wctype.h
+for ac_header in atomic.h crypt.h dld.h fp_class.h getopt.h ieeefp.h ifaddrs.h langinfo.h mbarrier.h poll.h sys/epoll.h sys/ipc.h sys/poll.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/sockio.h sys/tas.h sys/un.h termios.h ucred.h utime.h wchar.h wctype.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
for ac_header in net/if.h
do :
ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
-#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
-#endif
"
if test "x$ac_cv_header_net_if_h" = xyes; then :
# At least on IRIX, test for netinet/tcp.h will fail unless
# netinet/in.h is included first.
-for ac_header in netinet/in.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
-if test "x$ac_cv_header_netinet_in_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_NETINET_IN_H 1
-_ACEOF
-
-fi
-
-done
-
for ac_header in netinet/tcp.h
do :
ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
-#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
-#endif
"
if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
fi
ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
+#ifdef HAVE_SYS_IPC_H
#include <sys/ipc.h>
+#endif
+#ifdef HAVE_SYS_SEM_H
#include <sys/sem.h>
+#endif
"
if test "x$ac_cv_type_union_semun" = xyes; then :
fi
ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
-#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
-#endif
"
if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
fi
ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
-#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
-#endif
"
if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
fi
ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
-#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
-#endif
"
if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
fi
ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
-#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
-#endif
"
if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
fi
ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
-#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
-#endif
"
if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
fi
ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
-#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
-#endif
"
if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_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 *);
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
## Header files
##
-dnl sys/socket.h is required by AC_FUNC_ACCEPT_ARGTYPES
-AC_CHECK_HEADERS([atomic.h crypt.h dld.h fp_class.h getopt.h ieeefp.h ifaddrs.h langinfo.h mbarrier.h poll.h pwd.h sys/epoll.h sys/ioctl.h sys/ipc.h sys/poll.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/socket.h sys/sockio.h sys/tas.h sys/time.h sys/un.h termios.h ucred.h utime.h wchar.h wctype.h])
+AC_CHECK_HEADERS([atomic.h crypt.h dld.h fp_class.h getopt.h ieeefp.h ifaddrs.h langinfo.h mbarrier.h poll.h sys/epoll.h sys/ipc.h sys/poll.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/sockio.h sys/tas.h sys/un.h termios.h ucred.h utime.h wchar.h wctype.h])
# On BSD, test for net/if.h will fail unless sys/socket.h
# is included first.
AC_CHECK_HEADERS(net/if.h, [], [],
[AC_INCLUDES_DEFAULT
-#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
-#endif
])
# On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
# At least on IRIX, test for netinet/tcp.h will fail unless
# netinet/in.h is included first.
-AC_CHECK_HEADERS(netinet/in.h)
AC_CHECK_HEADERS(netinet/tcp.h, [], [],
[AC_INCLUDES_DEFAULT
-#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
-#endif
])
if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
}
#else /* !HAVE_GETIFADDRS && !WIN32 */
-#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
-#endif
#ifdef HAVE_NET_IF_H
#include <net/if.h>
#include <ctype.h>
#include <time.h>
-#ifdef HAVE_PWD_H
#include <pwd.h>
-#endif
#ifndef WIN32
#include <sys/stat.h> /* for stat() */
#include <fcntl.h> /* open() flags */
#ifndef LIBPQ_BE_H
#define LIBPQ_BE_H
-#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
-#endif
#ifdef USE_OPENSSL
#include <openssl/ssl.h>
#include <openssl/err.h>
/* Define to 1 if you have the `mkdtemp' function. */
#undef HAVE_MKDTEMP
-/* Define to 1 if you have the <netinet/in.h> header file. */
-#undef HAVE_NETINET_IN_H
-
/* Define to 1 if you have the <netinet/tcp.h> header file. */
#undef HAVE_NETINET_TCP_H
/* Have PTHREAD_PRIO_INHERIT. */
#undef HAVE_PTHREAD_PRIO_INHERIT
-/* Define to 1 if you have the <pwd.h> header file. */
-#undef HAVE_PWD_H
-
/* Define to 1 if you have the `random' function. */
#undef HAVE_RANDOM
/* Define to 1 if you have the <sys/epoll.h> header file. */
#undef HAVE_SYS_EPOLL_H
-/* Define to 1 if you have the <sys/ioctl.h> header file. */
-#undef HAVE_SYS_IOCTL_H
-
/* Define to 1 if you have the <sys/ipc.h> header file. */
#undef HAVE_SYS_IPC_H
/* Define to 1 if you have the <sys/shm.h> header file. */
#undef HAVE_SYS_SHM_H
-/* Define to 1 if you have the <sys/socket.h> header file. */
-#undef HAVE_SYS_SOCKET_H
-
/* Define to 1 if you have the <sys/sockio.h> header file. */
#undef HAVE_SYS_SOCKIO_H
/* Define to 1 if you have the <sys/tas.h> header file. */
#undef HAVE_SYS_TAS_H
-/* Define to 1 if you have the <sys/time.h> header file. */
-#undef HAVE_SYS_TIME_H
-
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the `mkdtemp' function. */
/* #undef HAVE_MKDTEMP */
-/* Define to 1 if you have the <netinet/in.h> header file. */
-#define HAVE_NETINET_IN_H 1
-
/* Define to 1 if you have the <netinet/tcp.h> header file. */
/* #undef HAVE_NETINET_TCP_H */
/* Define to 1 if the PS_STRINGS thing exists. */
/* #undef HAVE_PS_STRINGS */
-/* Define to 1 if you have the <pwd.h> header file. */
-#define HAVE_PWD_H 1
-
/* Define to 1 if you have the `random' function. */
/* #undef HAVE_RANDOM */
/* Define to 1 if you have the <sys/shm.h> header file. */
/* #undef HAVE_SYS_SHM_H */
-/* Define to 1 if you have the <sys/socket.h> header file. */
-#define HAVE_SYS_SOCKET_H 1
-
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
-/* Define to 1 if you have the <sys/time.h> header file. */
-#define HAVE_SYS_TIME_H 1
-
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1