]> granicus.if.org Git - curl/commitdiff
Added proper #ifdef's for the #include files when checking for in_addr_t,
authorDaniel Stenberg <daniel@haxx.se>
Thu, 30 Oct 2003 07:08:45 +0000 (07:08 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 30 Oct 2003 07:08:45 +0000 (07:08 +0000)
which made the test start working nicely on BeOS. Shard verified it.

acinclude.m4

index f847a8fbd9fa7f9f58ba20274f72cf7f478ce6db..dbd83d760228349ecd7fcb67939f414db9dbbc56 100644 (file)
@@ -140,8 +140,12 @@ AC_DEFUN([TYPE_SOCKLEN_T],
          for arg2 in "struct sockaddr" void; do
             for t in int size_t unsigned long "unsigned long"; do
                AC_TRY_COMPILE([
+                  #ifdef HAVE_SYS_TYPES_H
                   #include <sys/types.h>
+                  #endif
+                  #ifdef HAVE_SYS_SOCKET_H
                   #include <sys/socket.h>
+                  #endif
 
                   int getpeername (int, $arg2 *, $t *);
                ],[
@@ -177,9 +181,15 @@ AC_DEFUN([TYPE_IN_ADDR_T],
          curl_cv_in_addr_t_equiv=
          for t in "unsigned long" int size_t unsigned long; do
             AC_TRY_COMPILE([
+               #ifdef HAVE_SYS_TYPES_H
                #include <sys/types.h>
+               #endif
+               #ifdef HAVE_SYS_SOCKET_H
                #include <sys/socket.h>
+               #endif
+               #ifdef HAVE_ARPA_INET_H
                #include <arpa/inet.h>
+               #endif
             ],[
                $t data = inet_addr ("1.2.3.4");
             ],[