# define ioctl_t u_long
# define AC_SOCKET_INVALID ((unsigned int) ~0)
-# if SD_BOTH
+# ifdef SD_BOTH
# define tcp_close( s ) (shutdown( s, SD_BOTH ), closesocket( s ))
# else
# define tcp_close( s ) closesocket( s )
# define tcp_read( s, buf, len) read( s, buf, len )
# define tcp_write( s, buf, len) write( s, buf, len )
-# if SHUT_RDWR
+# ifdef SHUT_RDWR
# define tcp_close( s ) (shutdown( s, SHUT_RDWR ), close( s ))
# else
# define tcp_close( s ) close( s )