8 #ifdef HAVE_SYS_TYPES_H
12 #ifdef HAVE_SYS_SOCKET_H
13 #include <sys/socket.h>
15 #ifdef HAVE_SYS_SELECT_H
16 #include <sys/select.h>
19 #include <netinet/in.h>
20 #include <arpa/inet.h>
21 #include <arpa/nameser.h>
36 #endif /* HAVE_PCNFS */
38 #ifndef INADDR_LOOPBACK
39 #define INADDR_LOOPBACK ((unsigned long) 0x7f000001)
42 #ifndef MAXHOSTNAMELEN
43 #define MAXHOSTNAMELEN 64
47 #define tcp_close( s ) tcpclose( s )
51 #define tcp_close( s ) close( s )
54 #define tcp_close( s ) netclose( s ); netshut()
57 #define tcp_close( s ) closesocket( s );
60 #define tcp_close( s ) close( s )
64 #if !defined(__alpha) || defined(VMS)
65 #define AC_HTONL( l ) htonl( l )
66 #define AC_NTOHL( l ) ntohl( l )
67 #else /* __alpha && !VMS */
69 * htonl and ntohl on the DEC Alpha under OSF 1 seem to only swap the
70 * lower-order 32-bits of a (64-bit) long, so we define correct versions
73 #define AC_HTONL( l ) (((long)htonl( (l) & 0x00000000FFFFFFFF )) << 32 \
74 | htonl( ( (l) & 0xFFFFFFFF00000000 ) >> 32 ))
76 #define AC_NTOHL( l ) (((long)ntohl( (l) & 0x00000000FFFFFFFF )) << 32 \
77 | ntohl( ( (l) & 0xFFFFFFFF00000000 ) >> 32 ))
79 #endif /* __alpha && !VMS */
81 #endif /* _AC_SOCKET_H_ */