diff options
author | Ulrich Drepper <drepper@redhat.com> | 2002-08-30 07:07:16 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2002-08-30 07:07:16 +0000 |
commit | dd0ee2e1022843c6a296a9141b7cab7ea74eec28 (patch) | |
tree | 540fab065032d56a49c05c3787e50500e40bc87d /libio/iofopen.c | |
parent | b7fc6d07afa8956c5a18d28db02a52d63a70acb8 (diff) | |
download | glibc-dd0ee2e1022843c6a296a9141b7cab7ea74eec28.zip glibc-dd0ee2e1022843c6a296a9141b7cab7ea74eec28.tar.gz glibc-dd0ee2e1022843c6a296a9141b7cab7ea74eec28.tar.bz2 |
Update.
2002-08-29 Ulrich Drepper <drepper@redhat.com>
* libio/fileops.c (_IO_new_file_fopen): Recognize new mode specifier
'm' to enable mmap I/O.
* libio/libio.h (_IO_FILE): Rename _blksize field to _flags2. The
former wasn't used (anymore?).
(_IO_FLAGS2_MMAP): New define.
* libio/genops.c (_IO_no_init): Initialize _flags2 field.
* libio/iofopen.c (__fopen_maybe_mmap): Use mmap callbacks only if
_IO_FLAGS2_MMAP bit is set.
* libio/iofdopen.c (_IO_new_fdopen): Recognize 'm' mode specifier.
Enable mmap-using mode only if 'm' was set.
Diffstat (limited to 'libio/iofopen.c')
-rw-r--r-- | libio/iofopen.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libio/iofopen.c b/libio/iofopen.c index 00a2c5f..8cd68a3 100644 --- a/libio/iofopen.c +++ b/libio/iofopen.c @@ -41,7 +41,7 @@ __fopen_maybe_mmap (fp) _IO_FILE *fp; { #ifdef _G_HAVE_MMAP - if (fp->_flags & _IO_NO_WRITES) + if ((fp->_flags2 & _IO_FLAGS2_MMAP) && (fp->_flags & _IO_NO_WRITES)) { /* Since this is read-only, we might be able to mmap the contents directly. We delay the decision until the first read attempt by |