From fd091d3f3464d5e3c625ce89c83b4dd635aea678 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 21 Mar 2000 23:09:29 +0000 Subject: Update. * libio/oldtmpfile.c: Use new macros from shlib-compat.h to define versions. * libio/iofdopen.c: Likewise. * libio/iofgetpos.c: Likewise. * libio/iofgetpos64.c: Likewise. * libio/iofopen.c: Likewise. * libio/iofsetpos.c: Likewise. * libio/iofsetpos64.c: Likewise. * libio/iopopen.c: Likewise. * libio/oldiofopen.c: Likewise. * libio/pclose.c: Likewise. * sysdeps/gnu/siglist.c: Likewise. * sysdeps/unix/sysv/linux/errlist.c: Likewise. --- libio/iofdopen.c | 21 +++++++++------------ libio/iofgetpos.c | 9 ++++----- libio/iofgetpos64.c | 12 ++++++------ libio/iofopen.c | 14 ++++---------- libio/iofsetpos.c | 9 ++++----- libio/iofsetpos64.c | 9 ++++----- libio/iopopen.c | 22 ++++++---------------- libio/oldiofopen.c | 6 +++++- libio/oldtmpfile.c | 6 +++++- libio/pclose.c | 11 +++-------- 10 files changed, 50 insertions(+), 69 deletions(-) (limited to 'libio') diff --git a/libio/iofdopen.c b/libio/iofdopen.c index e8e32e03dc..0cbbee9051 100644 --- a/libio/iofdopen.c +++ b/libio/iofdopen.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1994, 1997, 1998, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1994, 1997-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 @@ -24,11 +24,15 @@ General Public License. */ #ifdef __STDC__ -#include +# include #endif #include "libioP.h" #include +#ifdef _LIBC +# include +#endif + #ifndef _IO_fcntl #ifdef _LIBC #define _IO_fcntl __fcntl @@ -79,7 +83,7 @@ _IO_new_fdopen (fd, mode) #endif if (fd_flags == -1) return NULL; - + if (((fd_flags & O_ACCMODE) == O_RDONLY && !(read_write & _IO_NO_WRITES)) || ((fd_flags & O_ACCMODE) == O_WRONLY && !(read_write & _IO_NO_READS))) { @@ -139,13 +143,6 @@ _IO_new_fdopen (fd, mode) return &new_f->fp.file; } -#if defined PIC && DO_VERSIONING strong_alias (_IO_new_fdopen, __new_fdopen) -default_symbol_version (_IO_new_fdopen, _IO_fdopen, GLIBC_2.1); -default_symbol_version (__new_fdopen, fdopen, GLIBC_2.1); -#else -# ifdef weak_alias -weak_alias (_IO_new_fdopen, _IO_fdopen) -weak_alias (_IO_new_fdopen, fdopen) -# endif -#endif +versioned_symbol (libc, _IO_new_fdopen, _IO_fdopen, GLIBC_2_1); +versioned_symbol (libc, __new_fdopen, fdopen, GLIBC_2_1); diff --git a/libio/iofgetpos.c b/libio/iofgetpos.c index 5b8f6a4129..c8ce084647 100644 --- a/libio/iofgetpos.c +++ b/libio/iofgetpos.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 95, 96, 97, 98, 99 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995-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 @@ -25,6 +25,7 @@ #include "libioP.h" #include +#include int _IO_new_fgetpos (fp, posp) @@ -58,8 +59,6 @@ _IO_new_fgetpos (fp, posp) return 0; } -#ifdef weak_alias strong_alias (_IO_new_fgetpos, __new_fgetpos) -default_symbol_version (_IO_new_fgetpos, _IO_fgetpos, GLIBC_2.2); -default_symbol_version (__new_fgetpos, fgetpos, GLIBC_2.2); -#endif +versioned_symbol (libc, _IO_new_fgetpos, _IO_fgetpos, GLIBC_2_2); +versioned_symbol (libc, __new_fgetpos, fgetpos, GLIBC_2_2); diff --git a/libio/iofgetpos64.c b/libio/iofgetpos64.c index cc39a3a9e1..89e31fc72d 100644 --- a/libio/iofgetpos64.c +++ b/libio/iofgetpos64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 95, 96, 97, 98, 99 Free Software Foundation, Inc. +/* Copyright (C) 1993, 95, 96, 97, 98, 99, 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 @@ -25,6 +25,8 @@ #include "libioP.h" #include +#include + int _IO_new_fgetpos64 (fp, posp) @@ -34,7 +36,7 @@ _IO_new_fgetpos64 (fp, posp) #ifdef _G_LSEEK64 _IO_off64_t pos; CHECK_FILE (fp, EOF); - _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp); + _IO_cleanup_region_start ((void (*) (void *)) _IO_funlockfile, fp); _IO_flockfile (fp); pos = _IO_seekoff (fp, 0, _IO_seek_cur, 0); if (_IO_in_backup (fp)) @@ -63,8 +65,6 @@ _IO_new_fgetpos64 (fp, posp) #endif } -#ifdef weak_alias -default_symbol_version (_IO_new_fgetpos64, _IO_fgetpos64, GLIBC_2.2); strong_alias (_IO_new_fgetpos64, __new_fgetpos64) -default_symbol_version (__new_fgetpos64, fgetpos64, GLIBC_2.2); -#endif +versioned_symbol (libc, _IO_new_fgetpos64, _IO_fgetpos64, GLIBC_2_2); +versioned_symbol (libc, __new_fgetpos64, fgetpos64, GLIBC_2_2); diff --git a/libio/iofopen.c b/libio/iofopen.c index 60b15a00f8..05e047929d 100644 --- a/libio/iofopen.c +++ b/libio/iofopen.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1997, 1998, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1993, 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 @@ -27,6 +27,7 @@ #ifdef __STDC__ #include #endif +#include _IO_FILE * _IO_new_fopen (filename, mode) @@ -60,13 +61,6 @@ _IO_new_fopen (filename, mode) return NULL; } -#if defined PIC && DO_VERSIONING strong_alias (_IO_new_fopen, __new_fopen) -default_symbol_version (_IO_new_fopen, _IO_fopen, GLIBC_2.1); -default_symbol_version (__new_fopen, fopen, GLIBC_2.1); -#else -# ifdef weak_alias -weak_alias (_IO_new_fopen, _IO_fopen) -weak_alias (_IO_new_fopen, fopen) -# endif -#endif +versioned_symbol (libc, _IO_new_fopen, _IO_fopen, GLIBC_2_1); +versioned_symbol (libc, __new_fopen, fopen, GLIBC_2_1); diff --git a/libio/iofsetpos.c b/libio/iofsetpos.c index bd49c13a83..6ba35939fc 100644 --- a/libio/iofsetpos.c +++ b/libio/iofsetpos.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1997, 1998, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1997-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 @@ -25,6 +25,7 @@ #include #include +#include int _IO_new_fsetpos (fp, posp) @@ -58,8 +59,6 @@ _IO_new_fsetpos (fp, posp) return result; } -#ifdef weak_alias -default_symbol_version (_IO_new_fsetpos, _IO_fsetpos, GLIBC_2.2); strong_alias (_IO_new_fsetpos, __new_fsetpos) -default_symbol_version (__new_fsetpos, fsetpos, GLIBC_2.2); -#endif +versioned_symbol (libc, _IO_new_fsetpos, _IO_fsetpos, GLIBC_2_2); +versioned_symbol (libc, __new_fsetpos, fsetpos, GLIBC_2_2); diff --git a/libio/iofsetpos64.c b/libio/iofsetpos64.c index a70d5e215a..ab2171c14c 100644 --- a/libio/iofsetpos64.c +++ b/libio/iofsetpos64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1997, 1998, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1997-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 @@ -25,6 +25,7 @@ #include #include +#include int _IO_new_fsetpos64 (fp, posp) @@ -63,8 +64,6 @@ _IO_new_fsetpos64 (fp, posp) #endif } -#ifdef weak_alias -default_symbol_version (_IO_new_fsetpos64, _IO_fsetpos64, GLIBC_2.2); strong_alias (_IO_new_fsetpos64, __new_fsetpos64) -default_symbol_version (__new_fsetpos64, fsetpos64, GLIBC_2.2); -#endif +versioned_symbol (libc, __new_fsetpos64, fsetpos64, GLIBC_2_2); +versioned_symbol (libc, _IO_new_fsetpos64, _IO_fsetpos64, GLIBC_2_2); diff --git a/libio/iopopen.c b/libio/iopopen.c index 15c15023f7..9d472fa212 100644 --- a/libio/iopopen.c +++ b/libio/iopopen.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1997, 1998, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU IO Library. Written by Per Bothner . @@ -36,6 +36,7 @@ #endif #ifdef _LIBC # include +# include #endif #include #include @@ -299,19 +300,8 @@ static struct _IO_jump_t _IO_wproc_jumps = { JUMP_INIT(imbue, _IO_default_imbue) }; -#if defined PIC && DO_VERSIONING strong_alias (_IO_new_popen, __new_popen) -default_symbol_version (_IO_new_popen, _IO_popen, GLIBC_2.1); -default_symbol_version (__new_popen, popen, GLIBC_2.1); -default_symbol_version (_IO_new_proc_open, _IO_proc_open, GLIBC_2.1); -default_symbol_version (_IO_new_proc_close, _IO_proc_close, GLIBC_2.1); -#else -# ifdef strong_alias -strong_alias (_IO_new_popen, popen) -# endif -# ifdef weak_alias -weak_alias (_IO_new_popen, _IO_popen) -weak_alias (_IO_new_proc_open, _IO_proc_open) -weak_alias (_IO_new_proc_close, _IO_proc_close) -# endif -#endif +versioned_symbol (libc, _IO_new_popen, _IO_popen, GLIBC_2_1); +versioned_symbol (libc, __new_popen, popen, GLIBC_2_1); +versioned_symbol (libc, _IO_new_proc_open, _IO_proc_open, GLIBC_2_1); +versioned_symbol (libc, _IO_new_proc_close, _IO_proc_close, GLIBC_2_1); diff --git a/libio/oldiofopen.c b/libio/oldiofopen.c index 7fc48b92b2..1461fbc519 100644 --- a/libio/oldiofopen.c +++ b/libio/oldiofopen.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1997, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1997, 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__ @@ -64,3 +67,4 @@ _IO_old_fopen (filename, mode) strong_alias (_IO_old_fopen, __old_fopen) symbol_version (_IO_old_fopen, _IO_fopen, GLIBC_2.0); symbol_version (__old_fopen, fopen, GLIBC_2.0); +#endif diff --git a/libio/oldtmpfile.c b/libio/oldtmpfile.c index 002fad07a5..37b52a44ab 100644 --- a/libio/oldtmpfile.c +++ b/libio/oldtmpfile.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 93, 96, 97, 98, 99 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1993, 1996-1999, 2000 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 @@ -16,6 +16,9 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include +#if SHLIB_COMPAT (libc, GLIBC_2_0) + #define _IO_USE_OLD_IO_FILE #include #include @@ -49,3 +52,4 @@ __old_tmpfile (void) } symbol_version (__old_tmpfile, tmpfile, GLIBC_2.0); +#endif diff --git a/libio/pclose.c b/libio/pclose.c index 944365934d..55f495ab52 100644 --- a/libio/pclose.c +++ b/libio/pclose.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1996-1998, 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 @@ -26,6 +26,7 @@ #include "libioP.h" #include "stdio.h" #include +#include int __new_pclose (fp) @@ -40,10 +41,4 @@ __new_pclose (fp) return _IO_new_fclose (fp); } -#if defined PIC && DO_VERSIONING -default_symbol_version (__new_pclose, pclose, GLIBC_2.1); -#else -# ifdef weak_alias -weak_alias (__new_pclose, pclose) -# endif -#endif +versioned_symbol (libc, __new_pclose, pclose, GLIBC_2_1); -- cgit v1.2.3