From: Bruno Haible Date: Mon, 29 Sep 2008 09:37:15 +0000 (+0200) Subject: Make the headers usable in C++. X-Git-Tag: v0.1~6943 X-Git-Url: http://erislabs.net/gitweb/?a=commitdiff_plain;h=ce8789a332a21bd438de0bafebec6de3125308ff;p=gnulib.git Make the headers usable in C++. --- diff --git a/ChangeLog b/ChangeLog index 6a39236af..bdff5cc5e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2008-09-29 Bruno Haible + * lib/sys_socket.in.h: Wrap the definitions in 'extern "C"'. + * lib/sys_select.in.h: Likewise. + +2008-09-29 Bruno Haible + * lib/winsock.c (rpl_close, rpl_socket): Remove unused variables. 2008-09-29 Bruno Haible diff --git a/lib/sys_select.in.h b/lib/sys_select.in.h index 341543b87..255c02ffd 100644 --- a/lib/sys_select.in.h +++ b/lib/sys_select.in.h @@ -40,10 +40,19 @@ # include # 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 diff --git a/lib/sys_socket.in.h b/lib/sys_socket.in.h index c7cd57fea..145408fd6 100644 --- a/lib/sys_socket.in.h +++ b/lib/sys_socket.in.h @@ -105,6 +105,10 @@ 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 */