From 14a2bd4b6d7a6fff5b4f6916af7eed796b919153 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 7 May 2003 03:48:45 +0000 Subject: Update. 2003-05-06 Ulrich Drepper * libio/oldiofdopen.c (_IO_old_fdopen): Use _IO_old_init not _IO_init. * libio/oldiofopen.c (_IO_old_fopen): Likewise. * libio/libioP.h: Declare _IO_old_init. * libio/genops.c (_IO_no_init): Split in two. New function _IO_old_init. --- libio/genops.c | 16 ++++++++++++---- libio/libioP.h | 1 + libio/oldiofdopen.c | 4 ++-- libio/oldiofopen.c | 4 ++-- 4 files changed, 17 insertions(+), 8 deletions(-) (limited to 'libio') diff --git a/libio/genops.c b/libio/genops.c index c88a26f5f9..8077268ba9 100644 --- a/libio/genops.c +++ b/libio/genops.c @@ -602,12 +602,9 @@ _IO_init (fp, flags) INTDEF(_IO_init) void -_IO_no_init (fp, flags, orientation, wd, jmp) +_IO_old_init (fp, flags) _IO_FILE *fp; int flags; - int orientation; - struct _IO_wide_data *wd; - struct _IO_jump_t *jmp; { fp->_flags = _IO_MAGIC|flags; fp->_flags2 = 0; @@ -633,6 +630,17 @@ _IO_no_init (fp, flags, orientation, wd, jmp) if (fp->_lock != NULL) _IO_lock_init (*fp->_lock); #endif +} + +void +_IO_no_init (fp, flags, orientation, wd, jmp) + _IO_FILE *fp; + int flags; + int orientation; + struct _IO_wide_data *wd; + struct _IO_jump_t *jmp; +{ + _IO_old_init (fp, flags); fp->_mode = orientation; #if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T if (orientation >= 0) diff --git a/libio/libioP.h b/libio/libioP.h index 8255fc997f..ca6535aab0 100644 --- a/libio/libioP.h +++ b/libio/libioP.h @@ -479,6 +479,7 @@ extern int _IO_new_fgetpos64 __P ((_IO_FILE *, _IO_fpos64_t *)); extern int _IO_old_fgetpos64 __P ((_IO_FILE *, _IO_fpos64_t *)); extern int _IO_new_fsetpos64 __P ((_IO_FILE *, const _IO_fpos64_t *)); extern int _IO_old_fsetpos64 __P ((_IO_FILE *, const _IO_fpos64_t *)); +extern void _IO_old_init __P ((_IO_FILE *fp, int flags)); #if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T diff --git a/libio/oldiofdopen.c b/libio/oldiofdopen.c index 9015504970..824a2fb0cc 100644 --- a/libio/oldiofdopen.c +++ b/libio/oldiofdopen.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993,94,97,99,2000,2002 Free Software Foundation, Inc. +/* Copyright (C) 1993,94,97,99,2000,2002,2003 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 @@ -114,7 +114,7 @@ _IO_old_fdopen (fd, mode) #ifdef _IO_MTSAFE_IO new_f->fp.file._lock = &new_f->lock; #endif - INTUSE(_IO_init) (&new_f->fp.file, 0); + _IO_old_init (&new_f->fp.file, 0); _IO_JUMPS (&new_f->fp) = &_IO_old_file_jumps; _IO_old_file_init (&new_f->fp); #if !_IO_UNIFIED_JUMPTABLES diff --git a/libio/oldiofopen.c b/libio/oldiofopen.c index 67a9eba6a6..29c0a18a21 100644 --- a/libio/oldiofopen.c +++ b/libio/oldiofopen.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1997, 1999, 2000, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1993,1997,1999,2000,2002,2003 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 @@ -53,7 +53,7 @@ _IO_old_fopen (filename, mode) #ifdef _IO_MTSAFE_IO new_f->fp.file._lock = &new_f->lock; #endif - INTUSE(_IO_init) (&new_f->fp.file, 0); + _IO_old_init (&new_f->fp.file, 0); _IO_JUMPS (&new_f->fp) = &_IO_old_file_jumps; _IO_old_file_init (&new_f->fp); #if !_IO_UNIFIED_JUMPTABLES -- cgit v1.2.3