diff options
author | Andreas Jaeger <aj@suse.de> | 2000-03-10 08:41:39 +0000 |
---|---|---|
committer | Andreas Jaeger <aj@suse.de> | 2000-03-10 08:41:39 +0000 |
commit | e8b1163ed03e17558e918116b2ab594a60161154 (patch) | |
tree | 79aa1e06f5a24d3fa6d23c007cf141aacaf4d4f0 /manual/filesys.texi | |
parent | f25da8d01f8d783fff627a95628a73b037526245 (diff) | |
download | glibc-e8b1163ed03e17558e918116b2ab594a60161154.zip glibc-e8b1163ed03e17558e918116b2ab594a60161154.tar.gz glibc-e8b1163ed03e17558e918116b2ab594a60161154.tar.bz2 |
2000-03-09 Martin Buchholz <martin@xemacs.org>
* sysdeps/unix/sysv/linux/alpha/syscall.S:
* manual/message.texi (Using gettextized software):
* manual/message.texi (Message Translation): Doc Fixes.
* manual/filesys.texi (File Size):
* manual/charset.texi (glibc iconv Implementation):
* locale/programs/ld-collate.c (collate_output):
* iconv/gconv_db.c (find_derivation):
* manual/install.texi:
* manual/search.texi (Hash Search Function):
* manual/stdio.texi (Output Conversion Syntax):
* FAQ.in:
* config.h.in:
* sysdeps/generic/dl-sysdep.c:
Doc Fixes. `allows to' is not correct English.
* elf/rtld.c: Doc fixes.
* manual/creature.texi (Feature Test Macros): Doc fixes.
* manual/memory.texi (Hooks for Malloc): Doc Fixes.
* manual/filesys.texi (Working Directory): Check for ERANGE to
avoid infloop.
Diffstat (limited to 'manual/filesys.texi')
-rw-r--r-- | manual/filesys.texi | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/manual/filesys.texi b/manual/filesys.texi index 5a3f0c5..e2c9ffb 100644 --- a/manual/filesys.texi +++ b/manual/filesys.texi @@ -91,19 +91,18 @@ using only the standard behavior of @code{getcwd}: @smallexample char * -gnu_getcwd () +gnu_getcwd (size_t size) @{ - int size = 100; - char *buffer = (char *) xmalloc (size); - while (1) @{ + char *buffer = (char *) xmalloc (size); char *value = getcwd (buffer, size); - if (value != 0) - return buffer; - size *= 2; + if (value == buffer) + return value; free (buffer); - buffer = (char *) xmalloc (size); + if (errno != ERANGE) + return value; + size *= 2; @} @} @end smallexample @@ -2558,8 +2557,8 @@ The operation was interrupted by a signal. @deftypefun int truncate64 (const char *@var{name}, off64_t @var{length}) This function is similar to the @code{truncate} function. The difference is that the @var{length} argument is 64 bits wide even on 32 -bits machines which allows to handle file with a size up to @math{2^63} -bytes. +bits machines, which allows the handling of files with sizes up to +@math{2^63} bytes. When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} on a 32 bits machine this function is actually available under the name @@ -2635,8 +2634,8 @@ The operation was interrupted by a signal. @deftypefun int ftruncate64 (int @var{id}, off64_t @var{length}) This function is similar to the @code{ftruncate} function. The difference is that the @var{length} argument is 64 bits wide even on 32 -bits machines which allows to handle file with a size up to @math{2^63} -bytes. +bits machines which allows the handling of files with sizes up to +@math{2^63} bytes. When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} on a 32 bits machine this function is actually available under the name |