From 0bf98029cd3f230233c48eee7f3e6d49cce37d74 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 22:08:26 +0000 Subject: Update. * libio/fileops.c: Use new macros from shlib-compat.h to define versions. * libio/iofclose.c: Likewise. * libio/oldiofclose.c: Likewise. --- libio/fileops.c | 46 ++++++++++++++-------------------------------- libio/iofclose.c | 12 +++--------- libio/oldiofclose.c | 7 ++++++- 3 files changed, 23 insertions(+), 42 deletions(-) (limited to 'libio') diff --git a/libio/fileops.c b/libio/fileops.c index 52880c52a9..c5aea3a60e 100644 --- a/libio/fileops.c +++ b/libio/fileops.c @@ -39,6 +39,7 @@ #endif #if _LIBC # include "../wcsmbs/wcsmbsload.h" +# include #endif #ifndef errno extern int errno; @@ -1014,35 +1015,16 @@ struct _IO_jump_t _IO_file_jumps = JUMP_INIT(imbue, _IO_default_imbue) }; - -#if defined PIC && DO_VERSIONING -default_symbol_version (_IO_new_do_write, _IO_do_write, GLIBC_2.1); -default_symbol_version (_IO_new_file_attach, _IO_file_attach, GLIBC_2.1); -default_symbol_version (_IO_new_file_close_it, _IO_file_close_it, GLIBC_2.1); -default_symbol_version (_IO_new_file_finish, _IO_file_finish, GLIBC_2.1); -default_symbol_version (_IO_new_file_fopen, _IO_file_fopen, GLIBC_2.1); -default_symbol_version (_IO_new_file_init, _IO_file_init, GLIBC_2.1); -default_symbol_version (_IO_new_file_setbuf, _IO_file_setbuf, GLIBC_2.1); -default_symbol_version (_IO_new_file_sync, _IO_file_sync, GLIBC_2.1); -default_symbol_version (_IO_new_file_overflow, _IO_file_overflow, GLIBC_2.1); -default_symbol_version (_IO_new_file_seekoff, _IO_file_seekoff, GLIBC_2.1); -default_symbol_version (_IO_new_file_underflow, _IO_file_underflow, GLIBC_2.1); -default_symbol_version (_IO_new_file_write, _IO_file_write, GLIBC_2.1); -default_symbol_version (_IO_new_file_xsputn, _IO_file_xsputn, GLIBC_2.1); -#else -# ifdef strong_alias -strong_alias (_IO_new_do_write, _IO_do_write); -strong_alias (_IO_new_file_attach, _IO_file_attach); -strong_alias (_IO_new_file_close_it, _IO_file_close_it); -strong_alias (_IO_new_file_finish, _IO_file_finish); -strong_alias (_IO_new_file_fopen, _IO_file_fopen); -strong_alias (_IO_new_file_init, _IO_file_init); -strong_alias (_IO_new_file_setbuf, _IO_file_setbuf); -strong_alias (_IO_new_file_sync, _IO_file_sync); -strong_alias (_IO_new_file_overflow, _IO_file_overflow); -strong_alias (_IO_new_file_seekoff, _IO_file_seekoff); -strong_alias (_IO_new_file_underflow, _IO_file_underflow); -strong_alias (_IO_new_file_write, _IO_file_write); -strong_alias (_IO_new_file_xsputn, _IO_file_xsputn); -# endif -#endif +versioned_symbol (libc, _IO_new_do_write, _IO_do_write, GLIBC_2_1); +versioned_symbol (libc, _IO_new_file_attach, _IO_file_attach, GLIBC_2_1); +versioned_symbol (libc, _IO_new_file_close_it, _IO_file_close_it, GLIBC_2_1); +versioned_symbol (libc, _IO_new_file_finish, _IO_file_finish, GLIBC_2_1); +versioned_symbol (libc, _IO_new_file_fopen, _IO_file_fopen, GLIBC_2_1); +versioned_symbol (libc, _IO_new_file_init, _IO_file_init, GLIBC_2_1); +versioned_symbol (libc, _IO_new_file_setbuf, _IO_file_setbuf, GLIBC_2_1); +versioned_symbol (libc, _IO_new_file_sync, _IO_file_sync, GLIBC_2_1); +versioned_symbol (libc, _IO_new_file_overflow, _IO_file_overflow, GLIBC_2_1); +versioned_symbol (libc, _IO_new_file_seekoff, _IO_file_seekoff, GLIBC_2_1); +versioned_symbol (libc, _IO_new_file_underflow, _IO_file_underflow, GLIBC_2_1); +versioned_symbol (libc, _IO_new_file_write, _IO_file_write, GLIBC_2_1); +versioned_symbol (libc, _IO_new_file_xsputn, _IO_file_xsputn, GLIBC_2_1); diff --git a/libio/iofclose.c b/libio/iofclose.c index a10ed9266f..7b8340c3bc 100644 --- a/libio/iofclose.c +++ b/libio/iofclose.c @@ -29,6 +29,7 @@ #endif #if _LIBC # include "../iconv/gconv_int.h" +# include #endif int @@ -86,13 +87,6 @@ _IO_new_fclose (fp) return status; } -#if defined PIC && DO_VERSIONING +versioned_symbol (libc, _IO_new_fclose, _IO_fclose, GLIBC_2_1); strong_alias (_IO_new_fclose, __new_fclose) -default_symbol_version (_IO_new_fclose, _IO_fclose, GLIBC_2.1); -default_symbol_version (__new_fclose, fclose, GLIBC_2.1); -#else -# ifdef weak_alias -weak_alias (_IO_new_fclose, _IO_fclose) -weak_alias (_IO_new_fclose, fclose) -# endif -#endif +versioned_symbol (libc, __new_fclose, fclose, GLIBC_2_1); diff --git a/libio/oldiofclose.c b/libio/oldiofclose.c index 8ddad32b04..d9420316a9 100644 --- a/libio/oldiofclose.c +++ b/libio/oldiofclose.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1997, 1998, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1993,1995,1997,1998,1999,2000 Free Software Foundation, Inc. This file is part of the GNU IO Library. This library is free software; you can redistribute it and/or @@ -23,6 +23,9 @@ other reasons why the executable file might be covered by the GNU General Public License. */ +#include +#if SHLIB_COMPAT (libc, GLIBC_2_0) + #define _IO_USE_OLD_IO_FILE #include "libioP.h" #ifdef __STDC__ @@ -66,3 +69,5 @@ _IO_old_fclose (fp) strong_alias (_IO_old_fclose, __old_fclose) symbol_version (_IO_old_fclose, _IO_fclose, GLIBC_2.0); symbol_version (__old_fclose, fclose, GLIBC_2.0); + +#endif -- cgit v1.2.3