Austin English : configure: Check for xinpgen struct.
Alexandre Julliard
julliard at winehq.org
Fri Jan 30 07:58:28 CST 2009
Module: wine
Branch: master
Commit: 68f2db299d288c277b72e4e8abf496949b44cd35
URL: http://source.winehq.org/git/wine.git/?a=commit;h=68f2db299d288c277b72e4e8abf496949b44cd35
Author: Austin English <austinenglish at gmail.com>
Date: Thu Jan 29 08:28:37 2009 -0600
configure: Check for xinpgen struct.
---
configure | 148 +++++++++++++++++++++++++++++++++++++++++++++++
configure.ac | 24 ++++++++
dlls/iphlpapi/ipstats.c | 6 +-
include/config.h.in | 3 +
4 files changed, 178 insertions(+), 3 deletions(-)
diff --git a/configure b/configure
index 6fd07c8..b820d2d 100755
--- a/configure
+++ b/configure
@@ -20488,6 +20488,154 @@ _ACEOF
fi
+{ $as_echo "$as_me:$LINENO: checking for struct xinpgen" >&5
+$as_echo_n "checking for struct xinpgen... " >&6; }
+if test "${ac_cv_type_struct_xinpgen+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_type_struct_xinpgen=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_SYS_SOCKETVAR_H
+#include <sys/socketvar.h>
+#endif
+#ifdef HAVE_NET_ROUTE_H
+#include <net/route.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_NETINET_IN_SYSTM_H
+#include <netinet/in_systm.h>
+#endif
+#ifdef HAVE_NETINET_IP_H
+#include <netinet/ip.h>
+#endif
+#ifdef HAVE_NETINET_IN_PCB_H
+#include <netinet/in_pcb.h>
+#endif
+
+int
+main ()
+{
+if (sizeof (struct xinpgen))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_SYS_SOCKETVAR_H
+#include <sys/socketvar.h>
+#endif
+#ifdef HAVE_NET_ROUTE_H
+#include <net/route.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_NETINET_IN_SYSTM_H
+#include <netinet/in_systm.h>
+#endif
+#ifdef HAVE_NETINET_IP_H
+#include <netinet/ip.h>
+#endif
+#ifdef HAVE_NETINET_IN_PCB_H
+#include <netinet/in_pcb.h>
+#endif
+
+int
+main ()
+{
+if (sizeof ((struct xinpgen)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_struct_xinpgen=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_xinpgen" >&5
+$as_echo "$ac_cv_type_struct_xinpgen" >&6; }
+if test "x$ac_cv_type_struct_xinpgen" = x""yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_XINPGEN 1
+_ACEOF
+
+
+fi
+
+
{ $as_echo "$as_me:$LINENO: checking for struct ff_effect.direction" >&5
$as_echo_n "checking for struct ff_effect.direction... " >&6; }
if test "${ac_cv_member_struct_ff_effect_direction+set}" = set; then
diff --git a/configure.ac b/configure.ac
index 8b78efe..b0725c1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1572,6 +1572,30 @@ AC_CHECK_TYPES([sigset_t],,,[#include <sys/types.h>
#include <signal.h>])
AC_CHECK_TYPES([request_sense],,,[#include <linux/cdrom.h>])
+AC_CHECK_TYPES([struct xinpgen],,,
+[#include <sys/types.h>
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_SYS_SOCKETVAR_H
+#include <sys/socketvar.h>
+#endif
+#ifdef HAVE_NET_ROUTE_H
+#include <net/route.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_NETINET_IN_SYSTM_H
+#include <netinet/in_systm.h>
+#endif
+#ifdef HAVE_NETINET_IP_H
+#include <netinet/ip.h>
+#endif
+#ifdef HAVE_NETINET_IN_PCB_H
+#include <netinet/in_pcb.h>
+#endif])
+
AC_CHECK_MEMBERS([struct ff_effect.direction],,,
[#ifdef HAVE_LINUX_INPUT_H
#include <linux/input.h>
diff --git a/dlls/iphlpapi/ipstats.c b/dlls/iphlpapi/ipstats.c
index 75d4611..31336f9 100644
--- a/dlls/iphlpapi/ipstats.c
+++ b/dlls/iphlpapi/ipstats.c
@@ -869,7 +869,7 @@ DWORD getUDPStats(MIB_UDPSTATS *stats)
static DWORD getNumWithOneHeader(const char *filename)
{
-#if defined(HAVE_SYS_SYSCTL_H) && defined(HAVE_NETINET_IN_PCB_H)
+#if defined(HAVE_SYS_SYSCTL_H) && defined(HAVE_STRUCT_XINPGEN)
size_t Len = 0;
char *Buf;
struct xinpgen *pXIG, *pOrigXIG;
@@ -1581,7 +1581,7 @@ DWORD getTcpTable(PMIB_TCPTABLE *ppTcpTable, DWORD maxEntries, HANDLE heap,
{
DWORD numEntries;
PMIB_TCPTABLE table;
-#if defined(HAVE_SYS_SYSCTL_H) && defined(HAVE_NETINET_IN_PCB_H)
+#if defined(HAVE_SYS_SYSCTL_H) && defined(HAVE_STRUCT_XINPGEN)
size_t Len = 0;
char *Buf;
struct xinpgen *pXIG, *pOrigXIG;
@@ -1615,7 +1615,7 @@ DWORD getTcpTable(PMIB_TCPTABLE *ppTcpTable, DWORD maxEntries, HANDLE heap,
if (!numEntries)
return NO_ERROR;
-#if defined(HAVE_SYS_SYSCTL_H) && defined(HAVE_NETINET_IN_PCB_H)
+#if defined(HAVE_SYS_SYSCTL_H) && defined(HAVE_STRUCT_XINPGEN)
if (sysctlbyname ("net.inet.tcp.pcblist", NULL, &Len, NULL, 0) < 0)
{
diff --git a/include/config.h.in b/include/config.h.in
index 11dc1c6..036b5fb 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -780,6 +780,9 @@
/* Define to 1 if `st_mtim' is member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_MTIM
+/* Define to 1 if the system has the type `struct xinpgen'. */
+#undef HAVE_STRUCT_XINPGEN
+
/* Define to 1 if you have the `symlink' function. */
#undef HAVE_SYMLINK
More information about the wine-cvs
mailing list