#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 )
#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;
}
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 */
#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>