aboutsummaryrefslogtreecommitdiff
path: root/libio/freopen64.c
diff options
context:
space:
mode:
Diffstat (limited to 'libio/freopen64.c')
-rw-r--r--libio/freopen64.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/libio/freopen64.c b/libio/freopen64.c
index 941eda0aa9..7ab9bd315a 100644
--- a/libio/freopen64.c
+++ b/libio/freopen64.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1993,1995,1996,1997,1998,2000,2001 Free Software Foundation, Inc.
+/* Copyright (C) 1993,1995,1996,1997,1998,2000,2001,2002
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -51,7 +52,12 @@ freopen64 (filename, mode, fp)
if (fd != -1)
filename = fd_to_filename (fd);
}
- result = _IO_freopen64 (filename, mode, fp);
+ INTUSE(_IO_file_close_it) (fp);
+ _IO_JUMPS ((struct _IO_FILE_plus *) fp) = &INTUSE(_IO_file_jumps);
+ fp->_wide_data->_wide_vtable = &INTUSE(_IO_wfile_jumps);
+ result = INTUSE(_IO_file_fopen) (fp, filename, mode, 0);
+ if (result != NULL)
+ result = __fopen_maybe_mmap (result);
if (result != NULL)
/* unbound stream orientation */
result->_mode = 0;