8 #ifdef HAVE_SYS_TYPES_H
12 #ifdef HAVE_SYS_SOCKET_H
13 #include <sys/socket.h>
15 #include <netinet/in.h>
16 #include <arpa/inet.h>
17 #include <arpa/nameser.h>
24 #define EMSGSIZE WSAEMSGSIZE
25 #define EHOSTUNREACH WSAEHOSTUNREACH
32 #endif /* HAVE_PCNFS */
34 #ifndef INADDR_LOOPBACK
35 #define INADDR_LOOPBACK ((unsigned long) 0x7f000001)
39 #define tcp_close( s ) tcpclose( s )
43 #define tcp_close( s ) close( s )
46 #define tcp_close( s ) netclose( s ); netshut()
49 #define tcp_close( s ) closesocket( s ); WSACleanup();
52 #define tcp_close( s ) close( s )
56 #if !defined(__alpha) || defined(VMS)
57 #define AC_HTONL( l ) htonl( l )
58 #define AC_NTOHL( l ) ntohl( l )
59 #else /* __alpha && !VMS */
61 * htonl and ntohl on the DEC Alpha under OSF 1 seem to only swap the
62 * lower-order 32-bits of a (64-bit) long, so we define correct versions
65 #define AC_HTONL( l ) (((long)htonl( (l) & 0x00000000FFFFFFFF )) << 32 \
66 | htonl( ( (l) & 0xFFFFFFFF00000000 ) >> 32 ))
68 #define AC_NTOHL( l ) (((long)ntohl( (l) & 0x00000000FFFFFFFF )) << 32 \
69 | ntohl( ( (l) & 0xFFFFFFFF00000000 ) >> 32 ))
71 #endif /* __alpha && !VMS */
74 #endif /* _AC_SOCKET_H_ */