- Added #include <sys/types.h> where needed for FreeBSD.

- Added protection for #include <sys/{socket,un}.h>.
This commit is contained in:
Patrik Stridvall 2002-11-08 19:34:52 +00:00 committed by Alexandre Julliard
parent 9ce27aa325
commit 63ae7feed6
2 changed files with 56 additions and 26 deletions

41
configure vendored
View File

@ -8731,7 +8731,10 @@ else
cat >conftest.$ac_ext <<_ACEOF cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure" #line $LINENO "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/socket.h> #include <sys/types.h>
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
#include <netipx/ipx.h> #include <netipx/ipx.h>
int int
main () main ()
@ -8783,7 +8786,10 @@ else
cat >conftest.$ac_ext <<_ACEOF cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure" #line $LINENO "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/socket.h> #include <sys/types.h>
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
#include <asm/types.h> #include <asm/types.h>
#include <linux/ipx.h> #include <linux/ipx.h>
int int
@ -11896,8 +11902,9 @@ else
cat >conftest.$ac_ext <<_ACEOF cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure" #line $LINENO "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_SYS_TYPES_H #include <sys/types.h>
# include <sys/types.h> #if HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif #endif
#include <$ac_header> #include <$ac_header>
@ -11946,9 +11953,7 @@ else
cat >conftest.$ac_ext <<_ACEOF cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure" #line $LINENO "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_SYS_TYPES_H #include <sys/types.h>
# include <sys/types.h>
#endif
#if HAVE_SYS_SOCKET_H #if HAVE_SYS_SOCKET_H
# include <sys/socket.h> # include <sys/socket.h>
#endif #endif
@ -11999,7 +12004,8 @@ else
cat >conftest.$ac_ext <<_ACEOF cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure" #line $LINENO "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_SYS_SOCKET_H #include <sys/types.h>
#if HAVE_SYS_SOCKET_H
# include <sys/socket.h> # include <sys/socket.h>
#endif #endif
#if HAVE_NETINET_IN_SYSTM_H #if HAVE_NETINET_IN_SYSTM_H
@ -12052,7 +12058,8 @@ else
cat >conftest.$ac_ext <<_ACEOF cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure" #line $LINENO "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_SYS_SOCKET_H #include <sys/types.h>
#if HAVE_SYS_SOCKET_H
# include <sys/socket.h> # include <sys/socket.h>
#endif #endif
@ -13311,7 +13318,9 @@ else
#line $LINENO "configure" #line $LINENO "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
#include <sys/socket.h> #ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
int int
main () main ()
{ {
@ -13361,7 +13370,9 @@ else
#line $LINENO "configure" #line $LINENO "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
#include <sys/socket.h> #ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
int int
main () main ()
{ {
@ -13411,8 +13422,12 @@ else
#line $LINENO "configure" #line $LINENO "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
#include <sys/socket.h> #ifdef HAVE_SYS_SOCKET_H
#include <sys/un.h> # include <sys/socket.h>
#endif
#ifdef HAVE_SYS_UN_H
# include <sys/un.h>
#endif
int int
main () main ()
{ {

View File

@ -495,7 +495,10 @@ fi
dnl **** Check for IPX (currently Linux only) **** dnl **** Check for IPX (currently Linux only) ****
AC_CACHE_CHECK([for GNU style IPX support], ac_cv_c_ipx_gnu, AC_CACHE_CHECK([for GNU style IPX support], ac_cv_c_ipx_gnu,
AC_TRY_COMPILE( AC_TRY_COMPILE(
[#include <sys/socket.h> [#include <sys/types.h>
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
#include <netipx/ipx.h>], #include <netipx/ipx.h>],
[((struct sockaddr_ipx *)0)->sipx_family == AF_IPX], [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
[ac_cv_c_ipx_gnu="yes"], [ac_cv_c_ipx_gnu="yes"],
@ -510,7 +513,10 @@ if test "$ac_cv_c_ipx_gnu" = "no"
then then
AC_CACHE_CHECK([for linux style IPX support], ac_cv_c_ipx_linux, AC_CACHE_CHECK([for linux style IPX support], ac_cv_c_ipx_linux,
AC_TRY_COMPILE( AC_TRY_COMPILE(
[#include <sys/socket.h> [#include <sys/types.h>
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
#include <asm/types.h> #include <asm/types.h>
#include <linux/ipx.h>], #include <linux/ipx.h>],
[((struct sockaddr_ipx *)0)->sipx_family == AF_IPX], [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
@ -1034,20 +1040,20 @@ AC_HEADER_STAT()
dnl **** Checks for headers that depend on other ones **** dnl **** Checks for headers that depend on other ones ****
AC_CHECK_HEADERS(sys/mount.h sys/user.h,,, AC_CHECK_HEADERS(sys/mount.h sys/user.h,,,
[#if HAVE_SYS_TYPES_H [#include <sys/types.h>
# include <sys/types.h> #if HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif]) #endif])
AC_CHECK_HEADERS(net/if.h,,, AC_CHECK_HEADERS(net/if.h,,,
[#if HAVE_SYS_TYPES_H [#include <sys/types.h>
# include <sys/types.h>
#endif
#if HAVE_SYS_SOCKET_H #if HAVE_SYS_SOCKET_H
# include <sys/socket.h> # include <sys/socket.h>
#endif]) #endif])
AC_CHECK_HEADERS(netinet/ip.h,,, AC_CHECK_HEADERS(netinet/ip.h,,,
[#if HAVE_SYS_SOCKET_H [#include <sys/types.h>
#if HAVE_SYS_SOCKET_H
# include <sys/socket.h> # include <sys/socket.h>
#endif #endif
#if HAVE_NETINET_IN_SYSTM_H #if HAVE_NETINET_IN_SYSTM_H
@ -1055,7 +1061,8 @@ AC_CHECK_HEADERS(netinet/ip.h,,,
#endif]) #endif])
AC_CHECK_HEADERS(resolv.h,,, AC_CHECK_HEADERS(resolv.h,,,
[#if HAVE_SYS_SOCKET_H [#include <sys/types.h>
#if HAVE_SYS_SOCKET_H
# include <sys/socket.h> # include <sys/socket.h>
#endif]) #endif])
@ -1250,20 +1257,28 @@ WINE_CHECK_STRUCT_MEMBER(statfs,f_bavail,
dnl Check for file descriptor passing with msg_accrights dnl Check for file descriptor passing with msg_accrights
WINE_CHECK_STRUCT_MEMBER(msghdr,msg_accrights, WINE_CHECK_STRUCT_MEMBER(msghdr,msg_accrights,
[#include <sys/types.h> [#include <sys/types.h>
#include <sys/socket.h>], #ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif],
[AC_DEFINE(HAVE_MSGHDR_ACCRIGHTS, 1, [Define if struct msghdr contains msg_accrights])]) [AC_DEFINE(HAVE_MSGHDR_ACCRIGHTS, 1, [Define if struct msghdr contains msg_accrights])])
dnl Check for the sa_len member in struct sockaddr dnl Check for the sa_len member in struct sockaddr
WINE_CHECK_STRUCT_MEMBER(sockaddr,sa_len, WINE_CHECK_STRUCT_MEMBER(sockaddr,sa_len,
[#include <sys/types.h> [#include <sys/types.h>
#include <sys/socket.h>], #ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif],
[AC_DEFINE(HAVE_SOCKADDR_SA_LEN, 1, [Define if struct sockaddr contains sa_len])]) [AC_DEFINE(HAVE_SOCKADDR_SA_LEN, 1, [Define if struct sockaddr contains sa_len])])
dnl Check for the sun_len member in struct sockaddr_un dnl Check for the sun_len member in struct sockaddr_un
WINE_CHECK_STRUCT_MEMBER(sockaddr_un,sun_len, WINE_CHECK_STRUCT_MEMBER(sockaddr_un,sun_len,
[#include <sys/types.h> [#include <sys/types.h>
#include <sys/socket.h> #ifdef HAVE_SYS_SOCKET_H
#include <sys/un.h>], # include <sys/socket.h>
#endif
#ifdef HAVE_SYS_UN_H
# include <sys/un.h>
#endif],
[AC_DEFINE(HAVE_SOCKADDR_SUN_LEN, 1, [Define if struct sockaddr_un contains sun_len])]) [AC_DEFINE(HAVE_SOCKADDR_SUN_LEN, 1, [Define if struct sockaddr_un contains sun_len])])
dnl *** check for the need to define __i386__ dnl *** check for the need to define __i386__