X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Funistd.in.h;h=0ec71ccc066801cf3593d2fdf800b3aff9b4b0f2;hb=7131d7e62897a001578f4b7902ec68a6c582246e;hp=2221b5d8aecd82d565a59048d8ff9bdcce012335;hpb=8c4874e600742f95ad38fbd6f518a3005ac4283c;p=gnulib.git diff --git a/lib/unistd.in.h b/lib/unistd.in.h index 2221b5d8a..0ec71ccc0 100644 --- a/lib/unistd.in.h +++ b/lib/unistd.in.h @@ -61,14 +61,16 @@ /* Cygwin 1.7.1 declares symlinkat in , not in . */ /* But avoid namespace pollution on glibc systems. */ #if (!(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) \ - || (@GNULIB_SYMLINKAT@ || defined GNULIB_POSIXCHECK)) \ + || ((@GNULIB_SYMLINKAT@ || defined GNULIB_POSIXCHECK) \ + && defined __CYGWIN__)) \ && ! defined __GLIBC__ # include #endif /* Cygwin 1.7.1 declares unlinkat in , not in . */ /* But avoid namespace pollution on glibc systems. */ -#if (@GNULIB_UNLINKAT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ +#if (@GNULIB_UNLINKAT@ || defined GNULIB_POSIXCHECK) && defined __CYGWIN__ \ + && ! defined __GLIBC__ # include #endif @@ -86,6 +88,13 @@ # include #endif +/* AIX and OSF/1 5.1 declare getdomainname in , not in . */ +/* But avoid namespace pollution on glibc systems. */ +#if @GNULIB_GETDOMAINNAME@ && (defined _AIX || defined __osf__) \ + && !defined __GLIBC__ +# include +#endif + #if (@GNULIB_WRITE@ || @GNULIB_READLINK@ || @GNULIB_READLINKAT@ \ || @GNULIB_PREAD@ || @GNULIB_PWRITE@ || defined GNULIB_POSIXCHECK) /* Get ssize_t. */ @@ -549,13 +558,21 @@ _GL_WARN_ON_USE (getcwd, "getcwd is unportable - " Null terminate it if the name is shorter than LEN. If the NIS domain name is longer than LEN, set errno = EINVAL and return -1. Return 0 if successful, otherwise set errno and return -1. */ -# if !@HAVE_GETDOMAINNAME@ +# if @REPLACE_GETDOMAINNAME@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getdomainname +# define getdomainname rpl_getdomainname +# endif +_GL_FUNCDECL_RPL (getdomainname, int, (char *name, size_t len) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (getdomainname, int, (char *name, size_t len)); +# else +# if !@HAVE_DECL_GETDOMAINNAME@ _GL_FUNCDECL_SYS (getdomainname, int, (char *name, size_t len) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (getdomainname, int, (char *name, size_t len)); # endif -/* Need to cast, because on MacOS X 10.5 systems, the second parameter is - int len. */ -_GL_CXXALIAS_SYS_CAST (getdomainname, int, (char *name, size_t len)); _GL_CXXALIASWARN (getdomainname); #elif defined GNULIB_POSIXCHECK # undef getdomainname @@ -633,7 +650,8 @@ _GL_CXXALIAS_RPL (gethostname, int, (char *name, size_t len)); _GL_FUNCDECL_SYS (gethostname, int, (char *name, size_t len) _GL_ARG_NONNULL ((1))); # endif -/* Need to cast, because on Solaris 10 systems, the second parameter is +/* Need to cast, because on Solaris 10 and OSF/1 5.1 systems, the second + parameter is int len. */ _GL_CXXALIAS_SYS_CAST (gethostname, int, (char *name, size_t len)); # endif