aboutsummaryrefslogtreecommitdiff
path: root/gl/unistd.in.h
diff options
context:
space:
mode:
authorGravatar Holger Weiss <holger@zedat.fu-berlin.de> 2009-05-20 00:32:10 +0200
committerGravatar Holger Weiss <holger@zedat.fu-berlin.de> 2009-05-20 00:32:10 +0200
commit50b3ff7b91e78a61aca93247bee586d6d7eb27c8 (patch)
treedb4c7eee24479ac7ee6888ce1562facf60159b71 /gl/unistd.in.h
parent2701ccd500e60537a8c2977a81549ff33eeaef3f (diff)
downloadmonitoring-plugins-50b3ff7b91e78a61aca93247bee586d6d7eb27c8.tar.gz
Sync with the latest Gnulib code (cb75dc5)
Signed-off-by: Holger Weiss <holger@zedat.fu-berlin.de>
Diffstat (limited to 'gl/unistd.in.h')
-rw-r--r--gl/unistd.in.h36
1 files changed, 30 insertions, 6 deletions
diff --git a/gl/unistd.in.h b/gl/unistd.in.h
index 1b2f80ee..fa8d84a3 100644
--- a/gl/unistd.in.h
+++ b/gl/unistd.in.h
@@ -1,5 +1,5 @@
/* Substitute for and wrapper around <unistd.h>.
- Copyright (C) 2003-2008 Free Software Foundation, Inc.
+ Copyright (C) 2003-2009 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -29,7 +29,7 @@
#ifndef _GL_UNISTD_H
#define _GL_UNISTD_H
-/* mingw doesn't define the SEEK_* macros in <unistd.h>. */
+/* mingw doesn't define the SEEK_* or *_FILENO macros in <unistd.h>. */
#if !(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET)
# include <stdio.h>
#endif
@@ -87,6 +87,17 @@
/* The definition of GL_LINK_WARNING is copied here. */
+/* OS/2 EMX lacks these macros. */
+#ifndef STDIN_FILENO
+# define STDIN_FILENO 0
+#endif
+#ifndef STDOUT_FILENO
+# define STDOUT_FILENO 1
+#endif
+#ifndef STDERR_FILENO
+# define STDERR_FILENO 2
+#endif
+
/* Declare overridden functions. */
#ifdef __cplusplus
@@ -120,10 +131,6 @@ extern int chown (const char *file, uid_t uid, gid_t gid);
#if @GNULIB_CLOSE@
-# if @UNISTD_H_HAVE_WINSOCK2_H@
-/* Need a gnulib internal function. */
-# define HAVE__GL_CLOSE_FD_MAYBE_SOCKET 1
-# endif
# if @REPLACE_CLOSE@
/* Automatically included by modules that need a replacement for close. */
# undef close
@@ -475,6 +482,23 @@ extern int lchown (char const *file, uid_t owner, gid_t group);
#endif
+#if @GNULIB_LINK@
+/* Create a new hard link for an existing file.
+ Return 0 if successful, otherwise -1 and errno set.
+ See POSIX:2001 specification
+ <http://www.opengroup.org/susv3xsh/link.html>. */
+# if !@HAVE_LINK@
+extern int link (const char *path1, const char *path2);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef link
+# define link(path1,path2) \
+ (GL_LINK_WARNING ("link is unportable - " \
+ "use gnulib module link for portability"), \
+ link (path1, path2))
+#endif
+
+
#if @GNULIB_LSEEK@
# if @REPLACE_LSEEK@
/* Set the offset of FD relative to SEEK_SET, SEEK_CUR, or SEEK_END.