]> git.sur5r.net Git - openldap/commitdiff
Add ioctl_t for arg type (Unix requires 'int', Winsock requires 'u_long').
authorKurt Zeilenga <kurt@openldap.org>
Mon, 29 Mar 1999 05:28:29 +0000 (05:28 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Mon, 29 Mar 1999 05:28:29 +0000 (05:28 +0000)
include/ac/socket.h
libraries/liblber/sockbuf.c
libraries/libldap/os-ip.c
servers/slapd/daemon.c

index 466cccd442eea0495dd6b6251d7d3ddfa1a667b6..c49226fcc15e5fe1b6375c11b0da8bed4c43771c 100644 (file)
@@ -66,6 +66,7 @@
 #ifdef HAVE_WINSOCK
 #      define tcp_close( s )           closesocket( s );
 #      define ioctl( s, c, a )         ioctlsocket( (s), (c), (a) )
+#      define ioctl_t                          u_long
 #elif MACOS
 #      define tcp_close( s )           tcpclose( s )
 #elif DOS
 #      define tcp_close( s )           close( s )
 #endif /* MACOS */
 
+#ifndef ioctl_t
+#      define ioctl_t                          int
+#endif
+
 #if !defined(__alpha) || defined(VMS)
 #define AC_HTONL( l ) htonl( l )
 #define AC_NTOHL( l ) ntohl( l )
index 1b4adad44d95ba241a644abdc405782602a64aec..f34f457112cf03b2745ca693a2088683df38501d 100644 (file)
@@ -580,7 +580,7 @@ int lber_pvt_sb_set_nonblock( Sockbuf *sb, int nb )
 #ifdef FIONBIO
    if (lber_pvt_sb_in_use(sb)) {
           /* WINSOCK requires the status to be a long */
-               u_long status = (nb!=0);
+               ioctl_t status = (nb!=0);
                if (ioctl( lber_pvt_sb_get_desc(sb), FIONBIO, &status ) == -1 ) {
         return -1;
       }
index 41f3dd1787bff5a759b66935c92c1f549ecb247c..54e068b2a19b60a4dc88e6bee73a60dc11f8d42a 100644 (file)
@@ -49,7 +49,7 @@ ldap_connect_to_host( Sockbuf *sb, char *host, unsigned long address,
        struct hostent          *hp = NULL;
 #ifdef notyet
 #ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS
-       int                     status; /* for ioctl call */
+       ioctl_t                 status; /* for ioctl call */
 #endif /* LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS */
 #endif /* notyet */
    
index 0f3c859860013d54f15dbb12a2a2faabf722bf71..8ef532f043574626cd102ea80a205fdd33bba98c 100644 (file)
 #include "ldapconfig.h"
 #include "slap.h"
 
-#ifdef HAVE_SYS_FILIO_H
-#include <sys/filio.h>
-#elif HAVE_SYS_IOCTL_H
-#include <sys/ioctl.h>
-#endif
-
 #ifdef HAVE_TCPD
 #include <tcpd.h>