about summary refs log tree commit diff
path: root/posix
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-01-06 22:06:45 +0000
committerUlrich Drepper <drepper@redhat.com>2005-01-06 22:06:45 +0000
commitf14038f2e295e7994e2317127cdea1cb26db6be1 (patch)
tree02f0641efa63b5104bcce310183385c7fcfbe514 /posix
parent4d37c8aa01de8894ff5a2554888a0f752d31fb04 (diff)
downloadglibc-f14038f2e295e7994e2317127cdea1cb26db6be1.tar.gz
glibc-f14038f2e295e7994e2317127cdea1cb26db6be1.tar.xz
glibc-f14038f2e295e7994e2317127cdea1cb26db6be1.zip
[BZ #640]
Update.
2005-01-06  Ulrich Drepper  <drepper@redhat.com>

	* posix/unistd.h: Declare ftruncate for POSIX 2003.  [BZ #640]
Diffstat (limited to 'posix')
-rw-r--r--posix/unistd.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/posix/unistd.h b/posix/unistd.h
index 269e997d39..06c8ca7c21 100644
--- a/posix/unistd.h
+++ b/posix/unistd.h
@@ -890,6 +890,11 @@ extern void sync (void) __THROW;
 extern int getpagesize (void)  __THROW __attribute__ ((__const__));
 
 
+/* Return the maximum number of file descriptors
+   the current process could possibly have.  */
+extern int getdtablesize (void) __THROW;
+
+
 /* Truncate FILE to LENGTH bytes.  */
 # ifndef __USE_FILE_OFFSET64
 extern int truncate (__const char *__file, __off_t __length)
@@ -908,6 +913,10 @@ extern int truncate64 (__const char *__file, __off64_t __length)
      __THROW __nonnull ((1)) __wur;
 # endif
 
+#endif /* Use BSD || X/Open Unix.  */
+
+#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K
+
 /* Truncate the file FD is open on to LENGTH bytes.  */
 # ifndef __USE_FILE_OFFSET64
 extern int ftruncate (int __fd, __off_t __length) __THROW __wur;
@@ -923,12 +932,7 @@ extern int __REDIRECT_NTH (ftruncate, (int __fd, __off64_t __length),
 extern int ftruncate64 (int __fd, __off64_t __length) __THROW __wur;
 # endif
 
-
-/* Return the maximum number of file descriptors
-   the current process could possibly have.  */
-extern int getdtablesize (void) __THROW;
-
-#endif /* Use BSD || X/Open Unix.  */
+#endif /* Use BSD || X/Open Unix || POSIX 2003.  */
 
 
 #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED