Update.
* libio/iofclose.c (_IO_new_fclose): Detect new streams and handle them appropriately. * libio/oldiofclose.c (_IO_old_fclose): Likewise.
This commit is contained in:
parent
63f7cb448b
commit
c7f7281eca
@ -1,5 +1,9 @@
|
||||
1999-07-25 Ulrich Drepper <drepper@cygnus.com>
|
||||
|
||||
* libio/iofclose.c (_IO_new_fclose): Detect new streams and handle
|
||||
them appropriately.
|
||||
* libio/oldiofclose.c (_IO_old_fclose): Likewise.
|
||||
|
||||
* misc/mntent_r.c: Allow spaces and tabs in entry names by
|
||||
encoding these characters.
|
||||
* misc/tst-mntent.c: Add test case for addmntent and getmntent.
|
||||
|
20
FAQ
20
FAQ
@ -41,6 +41,9 @@ please let me know.
|
||||
1.15. What's the problem with configure --enable-omitfp?
|
||||
1.16. I get failures during `make check'. What should I do?
|
||||
1.17. What is symbol versioning good for? Do I need it?
|
||||
1.18. How can I compile on my fast ix86 machine a working libc for my slow
|
||||
i386? After installing libc, programs abort with "Illegal
|
||||
Instruction".
|
||||
|
||||
2. Installation and configuration issues
|
||||
|
||||
@ -514,6 +517,23 @@ compatibility - forever! The binary compatibility you lose is not only
|
||||
against the previous version of the GNU libc (version 2.0) but also against
|
||||
all future versions.
|
||||
|
||||
|
||||
1.18. How can I compile on my fast ix86 machine a working libc for my slow
|
||||
i386? After installing libc, programs abort with "Illegal
|
||||
Instruction".
|
||||
|
||||
{AJ} glibc and gcc might generate some instructions on your machine that
|
||||
aren't available on i386. You've got to tell glibc that you're configuring
|
||||
for i386 with adding i386 as your machine, for example:
|
||||
|
||||
../configure --prefix=/usr i386-pc-linux-gnu
|
||||
|
||||
And you need to tell gcc to only generate i386 code, just add `-mcpu=i386'
|
||||
(just -m386 doesn't work) to your CFLAGS.
|
||||
|
||||
{UD} This applies not only to the i386. Compiling on a i686 for any older
|
||||
model will also fail if the above methods are not used.
|
||||
|
||||
|
||||
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993, 1995, 1997, 1998 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993, 1995, 1997, 1998, 1999 Free Software Foundation, Inc.
|
||||
This file is part of the GNU IO Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
@ -36,6 +36,12 @@ _IO_new_fclose (fp)
|
||||
|
||||
CHECK_FILE(fp, EOF);
|
||||
|
||||
/* We desperately try to help programs which are using streams in a
|
||||
strange way and mix old and new functions. Detect old streams
|
||||
here. */
|
||||
if (fp->_vtable_offset != 0)
|
||||
return _IO_old_fclose (fp);
|
||||
|
||||
_IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
|
||||
_IO_flockfile (fp);
|
||||
if (fp->_IO_file_flags & _IO_IS_FILEBUF)
|
||||
|
@ -37,6 +37,12 @@ _IO_old_fclose (fp)
|
||||
|
||||
CHECK_FILE(fp, EOF);
|
||||
|
||||
/* We desperately try to help programs which are using streams in a
|
||||
strange way and mix old and new functions. Detect new streams
|
||||
here. */
|
||||
if (fp->_vtable_offset == 0)
|
||||
return _IO_new_fclose (fp);
|
||||
|
||||
_IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
|
||||
_IO_flockfile (fp);
|
||||
if (fp->_IO_file_flags & _IO_IS_FILEBUF)
|
||||
|
@ -495,6 +495,14 @@ a pointer to a static variable of type @code{struct mntent} which is
|
||||
filled with the information from the next entry from the file currently
|
||||
read.
|
||||
|
||||
The file format used prescribes the use of spaces or tab characters to
|
||||
separate the fields. This makes it harder to use name containing one of
|
||||
these characters (e.g., mount points using spaces). Therefore these
|
||||
characters are encoded in the files and the @code{getmntent} function
|
||||
takes care of the decoding while reading the entries back in.
|
||||
@code{'\040'} is used to encode a space character, @code{'\012'} to
|
||||
encode a tab character and @code{'\\'} to encode a backslash.
|
||||
|
||||
If there was an error or the end of the file is reached the return value
|
||||
is @code{NULL}.
|
||||
|
||||
@ -514,6 +522,9 @@ pointed to by the @var{result} parameter. Additional information (e.g.,
|
||||
the strings pointed to by the elements of the result) are kept in the
|
||||
buffer of size @var{bufsize} pointed to by @var{buffer}.
|
||||
|
||||
Escaped characters (space, tab, backslash) are converted back in the
|
||||
same way as it happens for @code{getmentent}.
|
||||
|
||||
The function returns a @code{NULL} pointer in error cases. Errors could be:
|
||||
@itemize @bullet
|
||||
@item
|
||||
@ -539,6 +550,10 @@ to create a new file while leaving out the entry to be removed and after
|
||||
closing the file remove the old one and rename the new file to the
|
||||
chosen name.
|
||||
|
||||
This function takes care of spaces and tab characters in the names to be
|
||||
written to the file. It converts them and the backslash character into
|
||||
the format describe in the @code{getmntent} description above.
|
||||
|
||||
This function returns @math{0} in case the operation was successful.
|
||||
Otherwise the return value is @math{1} and @code{errno} is set
|
||||
appropriately.
|
||||
|
Loading…
x
Reference in New Issue
Block a user