diff options
Diffstat (limited to 'libio/filebuf.cc')
-rw-r--r-- | libio/filebuf.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libio/filebuf.cc b/libio/filebuf.cc index 1e2682fbce9..0cc67493a48 100644 --- a/libio/filebuf.cc +++ b/libio/filebuf.cc @@ -111,6 +111,10 @@ filebuf* filebuf::open(const char *filename, ios::openmode mode, int prot) posix_mode |= O_CREAT; if (mode & (int)ios::noreplace) posix_mode |= O_EXCL; +#if _G_HAVE_IO_FILE_OPEN + return (filebuf*)_IO_file_open (this, filename, posix_mode, prot, + read_write, 0); +#else int fd = ::open(filename, posix_mode, prot); if (fd < 0) return NULL; @@ -122,6 +126,7 @@ filebuf* filebuf::open(const char *filename, ios::openmode mode, int prot) } _IO_link_in(this); return this; +#endif } filebuf* filebuf::open(const char *filename, const char *mode) |