mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-09 02:52:04 +08:00
Add ioctl_t for arg type (Unix requires 'int', Winsock requires 'u_long').
This commit is contained in:
parent
ff23537bcb
commit
db721ca821
@ -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 )
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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 */
|
||||
|
||||
|
@ -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>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user