From: Roland McGrath Date: Wed, 16 Feb 2005 10:09:06 +0000 (+0000) Subject: 2005-01-06 Ulrich Drepper X-Git-Tag: cvs/fedora-glibc-2_3-20050216T1256~63 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c8176652eb899a668342249c1de895f301a48352;p=thirdparty%2Fglibc.git 2005-01-06 Ulrich Drepper * posix/unistd.h: Declare ftruncate for POSIX 2003. [BZ #640] --- diff --git a/posix/unistd.h b/posix/unistd.h index 5d42169e825..bf66f7543aa 100644 --- a/posix/unistd.h +++ b/posix/unistd.h @@ -884,6 +884,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) @@ -902,6 +907,10 @@ extern int truncate64 (__const char *__file, __off64_t __length) __THROW __nonnull ((1)); # 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; @@ -917,12 +926,7 @@ extern int __REDIRECT_NTH (ftruncate, (int __fd, __off64_t __length), extern int ftruncate64 (int __fd, __off64_t __length) __THROW; # 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