X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fsys_socket.in.h;h=c42497d049ddf82e44f4b0e0df830f0b0dc080d2;hb=1d71dc7c690b5fe61e3e0c06303ffb59434bba4b;hp=78026697bd71add1d6ed6ad638a8542cfcdb5a5d;hpb=b6772983c800c6faee7fc793b83975afb6d58bcc;p=gnulib.git diff --git a/lib/sys_socket.in.h b/lib/sys_socket.in.h index 78026697b..c42497d04 100644 --- a/lib/sys_socket.in.h +++ b/lib/sys_socket.in.h @@ -40,7 +40,7 @@ #else /* Normal invocation convention. */ -#ifndef _GL_SYS_SOCKET_H +#ifndef _@GUARD_PREFIX@_SYS_SOCKET_H #if @HAVE_SYS_SOCKET_H@ @@ -61,8 +61,8 @@ #endif -#ifndef _GL_SYS_SOCKET_H -#define _GL_SYS_SOCKET_H +#ifndef _@GUARD_PREFIX@_SYS_SOCKET_H +#define _@GUARD_PREFIX@_SYS_SOCKET_H /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ @@ -194,6 +194,8 @@ struct msghdr { #endif +/* Fix some definitions from . */ + #if @HAVE_WINSOCK2_H@ # if !GNULIB_defined_rpl_fd_isset @@ -222,28 +224,38 @@ rpl_fd_isset (SOCKET fd, fd_set * set) #endif -/* Wrap everything else to use libc file descriptors for sockets. */ +/* Hide some function declarations from . */ -#if @HAVE_WINSOCK2_H@ && !defined _GL_UNISTD_H -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef close -# define close close_used_without_including_unistd_h -# else - _GL_WARN_ON_USE (close, - "close() used without including "); +#if @HAVE_WINSOCK2_H@ +# if !defined _@GUARD_PREFIX@_UNISTD_H +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef close +# define close close_used_without_including_unistd_h +# else + _GL_WARN_ON_USE (close, + "close() used without including "); +# endif +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef gethostname +# define gethostname gethostname_used_without_including_unistd_h +# else + _GL_WARN_ON_USE (gethostname, + "gethostname() used without including "); +# endif # endif -#endif - -#if @HAVE_WINSOCK2_H@ && !defined _GL_UNISTD_H -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef gethostname -# define gethostname gethostname_used_without_including_unistd_h -# else - _GL_WARN_ON_USE (gethostname, - "gethostname() used without including "); +# if !defined _@GUARD_PREFIX@_SYS_SELECT_H +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef select +# define select select_used_without_including_sys_select_h +# else + _GL_WARN_ON_USE (select, + "select() used without including "); +# endif # endif #endif +/* Wrap everything else to use libc file descriptors for sockets. */ + #if @GNULIB_SOCKET@ # if @HAVE_WINSOCK2_H@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) @@ -633,16 +645,6 @@ _GL_WARN_ON_USE (shutdown, "shutdown is not always POSIX compliant - " # endif #endif -#if @HAVE_WINSOCK2_H@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef select -# define select select_used_without_including_sys_select_h -# else - _GL_WARN_ON_USE (select, - "select() used without including "); -# endif -#endif - #if @GNULIB_ACCEPT4@ /* Accept a connection on a socket, with specific opening flags. The flags are a bitmask, possibly including O_CLOEXEC (defined in ) @@ -676,6 +678,6 @@ _GL_WARN_ON_USE (accept4, "accept4 is unportable - " # endif #endif -#endif /* _GL_SYS_SOCKET_H */ -#endif /* _GL_SYS_SOCKET_H */ +#endif /* _@GUARD_PREFIX@_SYS_SOCKET_H */ +#endif /* _@GUARD_PREFIX@_SYS_SOCKET_H */ #endif