Make the headers usable in C++.
authorBruno Haible <bruno@clisp.org>
Mon, 29 Sep 2008 09:37:15 +0000 (11:37 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 29 Sep 2008 09:37:15 +0000 (11:37 +0200)
ChangeLog
lib/sys_select.in.h
lib/sys_socket.in.h

index 6a39236af13ca01cb5c4dd2521b47e0e496e8a33..bdff5cc5e6e7aab1cb3d603996fe2ccd7ea02f79 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-09-29  Bruno Haible  <bruno@clisp.org>
+
+       * lib/sys_socket.in.h: Wrap the definitions in 'extern "C"'.
+       * lib/sys_select.in.h: Likewise.
+
 2008-09-29  Bruno Haible  <bruno@clisp.org>
 
        * lib/winsock.c (rpl_close, rpl_socket): Remove unused variables.
index 341543b87e1884cbec74e7d12636c579abd91bac..255c02ffd83b1decfd65f828bf504b889fe8333e 100644 (file)
 # include <sys/socket.h>
 
 # if @HAVE_WINSOCK2_H@
+
+#  ifdef __cplusplus
+extern "C" {
+#  endif
+
 #  undef select
 #  define select               rpl_select
-
 extern int rpl_select (int, fd_set *, fd_set *, fd_set *, struct timeval *);
+
+#  ifdef __cplusplus
+}
+#  endif
+
 # endif
 
 #endif
index c7cd57fea5b71eba6b3a00768aeb2f37232ea01c..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
@@ -175,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 */