diff options
Diffstat (limited to 'gl/unistd.in.h')
-rw-r--r-- | gl/unistd.in.h | 36 |
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 @@ | |||
1 | /* Substitute for and wrapper around <unistd.h>. | 1 | /* Substitute for and wrapper around <unistd.h>. |
2 | Copyright (C) 2003-2008 Free Software Foundation, Inc. | 2 | Copyright (C) 2003-2009 Free Software Foundation, Inc. |
3 | 3 | ||
4 | This program is free software; you can redistribute it and/or modify | 4 | This program is free software; you can redistribute it and/or modify |
5 | it under the terms of the GNU General Public License as published by | 5 | it under the terms of the GNU General Public License as published by |
@@ -29,7 +29,7 @@ | |||
29 | #ifndef _GL_UNISTD_H | 29 | #ifndef _GL_UNISTD_H |
30 | #define _GL_UNISTD_H | 30 | #define _GL_UNISTD_H |
31 | 31 | ||
32 | /* mingw doesn't define the SEEK_* macros in <unistd.h>. */ | 32 | /* mingw doesn't define the SEEK_* or *_FILENO macros in <unistd.h>. */ |
33 | #if !(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) | 33 | #if !(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) |
34 | # include <stdio.h> | 34 | # include <stdio.h> |
35 | #endif | 35 | #endif |
@@ -87,6 +87,17 @@ | |||
87 | /* The definition of GL_LINK_WARNING is copied here. */ | 87 | /* The definition of GL_LINK_WARNING is copied here. */ |
88 | 88 | ||
89 | 89 | ||
90 | /* OS/2 EMX lacks these macros. */ | ||
91 | #ifndef STDIN_FILENO | ||
92 | # define STDIN_FILENO 0 | ||
93 | #endif | ||
94 | #ifndef STDOUT_FILENO | ||
95 | # define STDOUT_FILENO 1 | ||
96 | #endif | ||
97 | #ifndef STDERR_FILENO | ||
98 | # define STDERR_FILENO 2 | ||
99 | #endif | ||
100 | |||
90 | /* Declare overridden functions. */ | 101 | /* Declare overridden functions. */ |
91 | 102 | ||
92 | #ifdef __cplusplus | 103 | #ifdef __cplusplus |
@@ -120,10 +131,6 @@ extern int chown (const char *file, uid_t uid, gid_t gid); | |||
120 | 131 | ||
121 | 132 | ||
122 | #if @GNULIB_CLOSE@ | 133 | #if @GNULIB_CLOSE@ |
123 | # if @UNISTD_H_HAVE_WINSOCK2_H@ | ||
124 | /* Need a gnulib internal function. */ | ||
125 | # define HAVE__GL_CLOSE_FD_MAYBE_SOCKET 1 | ||
126 | # endif | ||
127 | # if @REPLACE_CLOSE@ | 134 | # if @REPLACE_CLOSE@ |
128 | /* Automatically included by modules that need a replacement for close. */ | 135 | /* Automatically included by modules that need a replacement for close. */ |
129 | # undef close | 136 | # undef close |
@@ -475,6 +482,23 @@ extern int lchown (char const *file, uid_t owner, gid_t group); | |||
475 | #endif | 482 | #endif |
476 | 483 | ||
477 | 484 | ||
485 | #if @GNULIB_LINK@ | ||
486 | /* Create a new hard link for an existing file. | ||
487 | Return 0 if successful, otherwise -1 and errno set. | ||
488 | See POSIX:2001 specification | ||
489 | <http://www.opengroup.org/susv3xsh/link.html>. */ | ||
490 | # if !@HAVE_LINK@ | ||
491 | extern int link (const char *path1, const char *path2); | ||
492 | # endif | ||
493 | #elif defined GNULIB_POSIXCHECK | ||
494 | # undef link | ||
495 | # define link(path1,path2) \ | ||
496 | (GL_LINK_WARNING ("link is unportable - " \ | ||
497 | "use gnulib module link for portability"), \ | ||
498 | link (path1, path2)) | ||
499 | #endif | ||
500 | |||
501 | |||
478 | #if @GNULIB_LSEEK@ | 502 | #if @GNULIB_LSEEK@ |
479 | # if @REPLACE_LSEEK@ | 503 | # if @REPLACE_LSEEK@ |
480 | /* Set the offset of FD relative to SEEK_SET, SEEK_CUR, or SEEK_END. | 504 | /* Set the offset of FD relative to SEEK_SET, SEEK_CUR, or SEEK_END. |