Add ioctl_t for arg type (Unix requires 'int', Winsock requires 'u_long').

This commit is contained in:
Kurt Zeilenga 1999-03-29 05:28:29 +00:00
parent ff23537bcb
commit db721ca821
4 changed files with 7 additions and 8 deletions

View 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
@ -79,6 +80,10 @@
# 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 )

View 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;
}

View 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 */

View File

@ -13,12 +13,6 @@
#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>