diff options
author | Ulrich Drepper <drepper@redhat.com> | 2002-08-30 07:04:16 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2002-08-30 07:04:16 +0000 |
commit | b7fc6d07afa8956c5a18d28db02a52d63a70acb8 (patch) | |
tree | e1c72af3e513c04bb5c959ad461939c3d43af1dc /libio/fileops.c | |
parent | cc13edc8d4351bb96bb2e0d785284ec089705cfa (diff) | |
download | glibc-b7fc6d07afa8956c5a18d28db02a52d63a70acb8.tar.gz glibc-b7fc6d07afa8956c5a18d28db02a52d63a70acb8.tar.xz glibc-b7fc6d07afa8956c5a18d28db02a52d63a70acb8.zip |
(_IO_new_file_fopen): Recognize new mode specifier 'm' to enable mmap I/O.
Diffstat (limited to 'libio/fileops.c')
-rw-r--r-- | libio/fileops.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libio/fileops.c b/libio/fileops.c index e9e919306d..c1892f34b8 100644 --- a/libio/fileops.c +++ b/libio/fileops.c @@ -290,7 +290,7 @@ _IO_new_file_fopen (fp, filename, mode, is32not64) #ifdef _LIBC last_recognized = mode; #endif - for (i = 1; i < 4; ++i) + for (i = 1; i < 5; ++i) { switch (*++mode) { @@ -313,6 +313,10 @@ _IO_new_file_fopen (fp, filename, mode, is32not64) #ifdef _LIBC last_recognized = mode; #endif + continue; + case 'm': + fp->_flags2 |= _IO_FLAGS2_MMAP; + continue; default: /* Ignore. */ continue; |