summaryrefslogtreecommitdiff
path: root/gl/unistd.in.h
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2010-12-06 16:20:45 +0100
committerSimon Josefsson <simon@josefsson.org>2010-12-06 16:20:45 +0100
commit705bd41bc85effe81660de90acf10f65bb23977c (patch)
tree9f41b7bbe9b1f9416f94a46cfd995eb0db5c8774 /gl/unistd.in.h
parent3ec531a07ddfaddacdef08af6d49abc0eb8d8edd (diff)
downloadgnutls-705bd41bc85effe81660de90acf10f65bb23977c.tar.gz
Update gnulib files.
Diffstat (limited to 'gl/unistd.in.h')
-rw-r--r--gl/unistd.in.h29
1 files changed, 23 insertions, 6 deletions
diff --git a/gl/unistd.in.h b/gl/unistd.in.h
index fb44e48158..fcf7c43904 100644
--- a/gl/unistd.in.h
+++ b/gl/unistd.in.h
@@ -61,14 +61,16 @@
/* Cygwin 1.7.1 declares symlinkat in <stdio.h>, not in <unistd.h>. */
/* 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 <stdio.h>
#endif
/* Cygwin 1.7.1 declares unlinkat in <fcntl.h>, not in <unistd.h>. */
/* 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 <fcntl.h>
#endif
@@ -86,6 +88,13 @@
# include <io.h>
#endif
+/* AIX and OSF/1 5.1 declare getdomainname in <netdb.h>, not in <unistd.h>. */
+/* But avoid namespace pollution on glibc systems. */
+#if @GNULIB_GETDOMAINNAME@ && (defined _AIX || defined __osf__) \
+ && !defined __GLIBC__
+# include <netdb.h>
+#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