# HG changeset patch # User Bruno Haible # Date 1222681035 -7200 # Node ID d0e994df59caf0cb423fabc9394528f10bd9f1ea # Parent 7e9bec4f5cc23dff0a544ce58f37bd1d47ee359b Make the headers usable in C++. diff -r 7e9bec4f5cc2 -r d0e994df59ca ChangeLog --- a/ChangeLog Mon Sep 29 11:36:12 2008 +0200 +++ b/ChangeLog Mon Sep 29 11:37:15 2008 +0200 @@ -1,3 +1,8 @@ +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. diff -r 7e9bec4f5cc2 -r d0e994df59ca lib/sys_select.in.h --- a/lib/sys_select.in.h Mon Sep 29 11:36:12 2008 +0200 +++ b/lib/sys_select.in.h Mon Sep 29 11:37:15 2008 +0200 @@ -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 *); -extern int rpl_select (int, fd_set *, fd_set *, fd_set *, struct timeval *); +# ifdef __cplusplus +} +# endif + # endif #endif diff -r 7e9bec4f5cc2 -r d0e994df59ca lib/sys_socket.in.h --- a/lib/sys_socket.in.h Mon Sep 29 11:36:12 2008 +0200 +++ b/lib/sys_socket.in.h Mon Sep 29 11:37:15 2008 +0200 @@ -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_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 */