Make the headers usable in C++.
[pspp] / lib / sys_socket.in.h
index 53c71956b6bf40b3b8df9400eb25a5da50a56011..145408fd65e72e038b9d600966d261024489a999 100644 (file)
 
 typedef int socklen_t;
 
+#  ifdef __cplusplus
+extern "C" {
+#  endif
+
 /* Re-define FD_ISSET to avoid a WSA call while we are not using 
    network sockets.  */
 static inline int
@@ -156,9 +160,8 @@ rpl_fd_isset (int fd, fd_set * set)
 #  define sendto               rpl_sendto
 #  undef setsockopt
 #  define setsockopt           rpl_setsockopt
-
 #  undef select
-#  define select               select_not_supported_under_win32_use_poll
+#  define select               select_used_without_including_sys_select_h
 
 extern int rpl_close(int);
 extern int rpl_socket (int, int, int protocol);
@@ -176,6 +179,10 @@ extern int rpl_recvfrom (int, void *, int, int, struct sockaddr *, int *);
 extern int rpl_sendto (int, const void *, int, int, struct sockaddr *, int);
 extern int rpl_setsockopt (int, int, int, const void *, int);
 
+#  ifdef __cplusplus
+}
+#  endif
+
 # endif /* HAVE_WINSOCK2_H */
 
 #endif /* HAVE_SYS_SOCKET_H */