summary refs log tree commit diff
path: root/libio
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2000-03-27 05:18:47 +0000
committerRoland McGrath <roland@gnu.org>2000-03-27 05:18:47 +0000
commit16710d582967555671fc8f4a188bbea7432f2e7d (patch)
treed5d70f9fa5a6fb14db92c24d6c40248f37cfd9f8 /libio
parent54f6cbb3795fbc9c65965a88e3cd2a60d05acc6d (diff)
downloadglibc-16710d582967555671fc8f4a188bbea7432f2e7d.tar.gz
glibc-16710d582967555671fc8f4a188bbea7432f2e7d.tar.xz
glibc-16710d582967555671fc8f4a188bbea7432f2e7d.zip
* dlfcn/dlopen.c: Use <shlib-compat.h> macros.
	* dlfcn/dlopenold.c: Likewise.
	* nss/getXXbyYY_r.c: Likewise.
	* nss/getXXent_r.c: Likewise.
	* hurd/hurdinit.c: Likewise.
	* hurd/compat-20.c: Likewise.
	* libio/oldiofopen.c: Likewise.
	* libio/oldiofclose.c: Likewise.
	* libio/oldiofdopen.c: Likewise.
	* libio/oldfileops.c: Likewise.
	* libio/oldstdfiles.c: Likewise.
	* libio/oldiofsetpos.c: Likewise.
	* libio/oldiofgetpos.c: Likewise.
	* libio/oldiofgetpos64.c: Likewise.
	* libio/oldiofsetpos64.c: Likewise.
	* libio/oldiopopen.c: Likewise.
	* libio/oldpclose.c: Likewise.
	* libio/oldtmpfile.c: Likewise.
	* libio/freopen.c (freopen): Likewise.
	* libio/iofclose.c (_IO_new_fclose): Likewise.
Diffstat (limited to 'libio')
-rw-r--r--libio/freopen.c6
-rw-r--r--libio/iofclose.c2
-rw-r--r--libio/oldfileops.c36
-rw-r--r--libio/oldiofclose.c4
-rw-r--r--libio/oldiofdopen.c11
-rw-r--r--libio/oldiofgetpos.c11
-rw-r--r--libio/oldiofgetpos64.c11
-rw-r--r--libio/oldiofopen.c4
-rw-r--r--libio/oldiofsetpos.c10
-rw-r--r--libio/oldiofsetpos64.c11
-rw-r--r--libio/oldiopopen.c17
-rw-r--r--libio/oldpclose.c8
-rw-r--r--libio/oldstdfiles.c6
-rw-r--r--libio/oldtmpfile.c2
14 files changed, 89 insertions, 50 deletions
diff --git a/libio/freopen.c b/libio/freopen.c
index 22f2434ecb..59b1726552 100644
--- a/libio/freopen.c
+++ b/libio/freopen.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1993,95,96,97,98,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
@@ -31,6 +31,8 @@ extern void *_IO_stdin_used;
 weak_extern (_IO_stdin_used);
 #endif
 
+#include <shlib-compat.h>
+
 FILE*
 freopen (filename, mode, fp)
      const char* filename;
@@ -43,7 +45,7 @@ freopen (filename, mode, fp)
     return NULL;
   _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
   _IO_flockfile (fp);
-#if defined PIC && DO_VERSIONING
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
   if (&_IO_stdin_used == NULL)
     /* If the shared C library is used by the application binary which
        was linked against the older version of libio, we just use the
diff --git a/libio/iofclose.c b/libio/iofclose.c
index 7b8340c3bc..ebe948ac2a 100644
--- a/libio/iofclose.c
+++ b/libio/iofclose.c
@@ -40,7 +40,7 @@ _IO_new_fclose (fp)
 
   CHECK_FILE(fp, EOF);
 
-#if defined PIC && DO_VERSIONING
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
   /* We desperately try to help programs which are using streams in a
      strange way and mix old and new functions.  Detect old streams
      here.  */
diff --git a/libio/oldfileops.c b/libio/oldfileops.c
index fd118a64e4..f26f9f12d2 100644
--- a/libio/oldfileops.c
+++ b/libio/oldfileops.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1993,95,97,98,99,2000 Free Software Foundation, Inc.
    This file is part of the GNU IO Library.
    Written by Per Bothner <bothner@cygnus.com>.
 
@@ -26,8 +26,8 @@
 
 /* This is a compatibility file.  If we don't build the libc with
    versioning don't compile this file.  */
-#if defined PIC && DO_VERSIONING
-
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
 
 #ifndef _POSIX_SOURCE
 # define _POSIX_SOURCE
@@ -773,18 +773,18 @@ struct _IO_jump_t _IO_old_file_jumps =
   JUMP_INIT(stat, _IO_file_stat)
 };
 
-symbol_version (_IO_old_do_write, _IO_do_write, GLIBC_2.0);
-symbol_version (_IO_old_file_attach, _IO_file_attach, GLIBC_2.0);
-symbol_version (_IO_old_file_close_it, _IO_file_close_it, GLIBC_2.0);
-symbol_version (_IO_old_file_finish, _IO_file_finish, GLIBC_2.0);
-symbol_version (_IO_old_file_fopen, _IO_file_fopen, GLIBC_2.0);
-symbol_version (_IO_old_file_init, _IO_file_init, GLIBC_2.0);
-symbol_version (_IO_old_file_setbuf, _IO_file_setbuf, GLIBC_2.0);
-symbol_version (_IO_old_file_sync, _IO_file_sync, GLIBC_2.0);
-symbol_version (_IO_old_file_overflow, _IO_file_overflow, GLIBC_2.0);
-symbol_version (_IO_old_file_seekoff, _IO_file_seekoff, GLIBC_2.0);
-symbol_version (_IO_old_file_underflow, _IO_file_underflow, GLIBC_2.0);
-symbol_version (_IO_old_file_write, _IO_file_write, GLIBC_2.0);
-symbol_version (_IO_old_file_xsputn, _IO_file_xsputn, GLIBC_2.0);
-
-#endif /* PIC && DO_VERSIONING */
+compat_symbol (libc, _IO_old_do_write, _IO_do_write, GLIBC_2_0);
+compat_symbol (libc, _IO_old_file_attach, _IO_file_attach, GLIBC_2_0);
+compat_symbol (libc, _IO_old_file_close_it, _IO_file_close_it, GLIBC_2_0);
+compat_symbol (libc, _IO_old_file_finish, _IO_file_finish, GLIBC_2_0);
+compat_symbol (libc, _IO_old_file_fopen, _IO_file_fopen, GLIBC_2_0);
+compat_symbol (libc, _IO_old_file_init, _IO_file_init, GLIBC_2_0);
+compat_symbol (libc, _IO_old_file_setbuf, _IO_file_setbuf, GLIBC_2_0);
+compat_symbol (libc, _IO_old_file_sync, _IO_file_sync, GLIBC_2_0);
+compat_symbol (libc, _IO_old_file_overflow, _IO_file_overflow, GLIBC_2_0);
+compat_symbol (libc, _IO_old_file_seekoff, _IO_file_seekoff, GLIBC_2_0);
+compat_symbol (libc, _IO_old_file_underflow, _IO_file_underflow, GLIBC_2_0);
+compat_symbol (libc, _IO_old_file_write, _IO_file_write, GLIBC_2_0);
+compat_symbol (libc, _IO_old_file_xsputn, _IO_file_xsputn, GLIBC_2_0);
+
+#endif
diff --git a/libio/oldiofclose.c b/libio/oldiofclose.c
index f823b94166..d3dff66a01 100644
--- a/libio/oldiofclose.c
+++ b/libio/oldiofclose.c
@@ -67,7 +67,7 @@ _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);
+compat_symbol (libc, _IO_old_fclose, _IO_fclose, GLIBC_2_0);
+compat_symbol (libc, __old_fclose, fclose, GLIBC_2_0);
 
 #endif
diff --git a/libio/oldiofdopen.c b/libio/oldiofdopen.c
index 613c3330e4..ed3a220e41 100644
--- a/libio/oldiofdopen.c
+++ b/libio/oldiofdopen.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1994, 1997, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1993,94,97,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
@@ -23,6 +23,9 @@
    other reasons why the executable file might be covered by the GNU
    General Public License.  */
 
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
+
 #define _IO_USE_OLD_IO_FILE
 #ifdef __STDC__
 # include <stdlib.h>
@@ -131,5 +134,7 @@ _IO_old_fdopen (fd, mode)
 }
 
 strong_alias (_IO_old_fdopen, __old_fdopen)
-symbol_version (_IO_old_fdopen, _IO_fdopen, GLIBC_2.0);
-symbol_version (__old_fdopen, fdopen, GLIBC_2.0);
+compat_symbol (libc, _IO_old_fdopen, _IO_fdopen, GLIBC_2_0);
+compat_symbol (libc, __old_fdopen, fdopen, GLIBC_2_0);
+
+#endif
diff --git a/libio/oldiofgetpos.c b/libio/oldiofgetpos.c
index 2b4d10ad3e..08321bf55f 100644
--- a/libio/oldiofgetpos.c
+++ b/libio/oldiofgetpos.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
@@ -26,6 +26,9 @@
 #include "libioP.h"
 #include <errno.h>
 
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2)
+
 int
 _IO_old_fgetpos (fp, posp)
      _IO_FILE *fp;
@@ -55,7 +58,9 @@ _IO_old_fgetpos (fp, posp)
 }
 
 #ifdef weak_alias
-symbol_version (_IO_old_fgetpos, _IO_fgetpos, GLIBC_2.0);
+compat_symbol (libc, _IO_old_fgetpos, _IO_fgetpos, GLIBC_2_0);
 strong_alias (_IO_old_fgetpos, __old_fgetpos)
-symbol_version (__old_fgetpos, fgetpos, GLIBC_2.0);
+compat_symbol (libc, __old_fgetpos, fgetpos, GLIBC_2_0);
+#endif
+
 #endif
diff --git a/libio/oldiofgetpos64.c b/libio/oldiofgetpos64.c
index 9695c6f53d..8591af33b5 100644
--- a/libio/oldiofgetpos64.c
+++ b/libio/oldiofgetpos64.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
@@ -26,6 +26,9 @@
 #include "libioP.h"
 #include <errno.h>
 
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2)
+
 int
 _IO_old_fgetpos64 (fp, posp)
      _IO_FILE *fp;
@@ -60,7 +63,9 @@ _IO_old_fgetpos64 (fp, posp)
 }
 
 #ifdef weak_alias
-symbol_version (_IO_old_fgetpos64, _IO_fgetpos64, GLIBC_2.0);
+compat_symbol (libc, _IO_old_fgetpos64, _IO_fgetpos64, GLIBC_2_0);
 strong_alias (_IO_old_fgetpos64, __old_fgetpos64)
-symbol_version (__old_fgetpos64, fgetpos64, GLIBC_2.0);
+compat_symbol (libc, __old_fgetpos64, fgetpos64, GLIBC_2_0);
+#endif
+
 #endif
diff --git a/libio/oldiofopen.c b/libio/oldiofopen.c
index a8c9a9e1f4..18e4b99a8f 100644
--- a/libio/oldiofopen.c
+++ b/libio/oldiofopen.c
@@ -65,6 +65,6 @@ _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);
+compat_symbol (libc, _IO_old_fopen, _IO_fopen, GLIBC_2_0);
+compat_symbol (libc, __old_fopen, fopen, GLIBC_2_0);
 #endif
diff --git a/libio/oldiofsetpos.c b/libio/oldiofsetpos.c
index 87a78d2eea..2637ab80f0 100644
--- a/libio/oldiofsetpos.c
+++ b/libio/oldiofsetpos.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1993,95,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
@@ -26,6 +26,8 @@
 #include <libioP.h>
 #include <errno.h>
 
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2)
 int
 _IO_old_fsetpos (fp, posp)
      _IO_FILE *fp;
@@ -53,7 +55,9 @@ _IO_old_fsetpos (fp, posp)
 }
 
 #ifdef weak_alias
-symbol_version (_IO_old_fsetpos, _IO_fsetpos, GLIBC_2.0);
+compat_symbol (libc, _IO_old_fsetpos, _IO_fsetpos, GLIBC_2_0);
 strong_alias (_IO_old_fsetpos, __old_fsetpos)
-symbol_version (__old_fsetpos, fsetpos, GLIBC_2.0);
+compat_symbol (libc, __old_fsetpos, fsetpos, GLIBC_2_0);
+#endif
+
 #endif
diff --git a/libio/oldiofsetpos64.c b/libio/oldiofsetpos64.c
index 9207dd71bd..1ce42195f9 100644
--- a/libio/oldiofsetpos64.c
+++ b/libio/oldiofsetpos64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1993,95,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
@@ -26,6 +26,9 @@
 #include <libioP.h>
 #include <errno.h>
 
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2)
+
 int
 _IO_old_fsetpos64 (fp, posp)
      _IO_FILE *fp;
@@ -58,7 +61,9 @@ _IO_old_fsetpos64 (fp, posp)
 }
 
 #ifdef weak_alias
-symbol_version (_IO_old_fsetpos64, _IO_fsetpos64, GLIBC_2.0);
+compat_symbol (libc, _IO_old_fsetpos64, _IO_fsetpos64, GLIBC_2_0);
 strong_alias (_IO_fsetpos64, __old_fsetpos64)
-symbol_version (__old_fsetpos64, _IO_fsetpos64, GLIBC_2.0);
+compat_symbol (libc, __old_fsetpos64, _IO_fsetpos64, GLIBC_2_0);
+#endif
+
 #endif
diff --git a/libio/oldiopopen.c b/libio/oldiopopen.c
index 556a9ff86f..815074f3bf 100644
--- a/libio/oldiopopen.c
+++ b/libio/oldiopopen.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1998,99,2000 Free Software Foundation, Inc.
    This file is part of the GNU IO Library.
    Written by Per Bothner <bothner@cygnus.com>.
 
@@ -24,6 +24,9 @@
    other reasons why the executable file might be covered by the GNU
    General Public License.  */
 
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
+
 #define _IO_USE_OLD_IO_FILE
 #ifndef _POSIX_SOURCE
 # define _POSIX_SOURCE
@@ -141,7 +144,7 @@ _IO_old_proc_open (fp, command, mode)
     {
       int child_std_end = mode[0] == 'r' ? 1 : 0;
       struct _IO_proc_file *p;
-      
+
       _IO_close (parent_end);
       if (child_end != child_std_end)
 	{
@@ -275,7 +278,9 @@ struct _IO_jump_t _IO_old_proc_jumps = {
 };
 
 strong_alias (_IO_old_popen, __old_popen)
-symbol_version (_IO_old_popen, _IO_popen, GLIBC_2.0);
-symbol_version (__old_popen, popen, GLIBC_2.0);
-symbol_version (_IO_old_proc_open, _IO_proc_open, GLIBC_2.0);
-symbol_version (_IO_old_proc_close, _IO_proc_close, GLIBC_2.0);
+compat_symbol (libc, _IO_old_popen, _IO_popen, GLIBC_2_0);
+compat_symbol (libc, __old_popen, popen, GLIBC_2_0);
+compat_symbol (libc, _IO_old_proc_open, _IO_proc_open, GLIBC_2_0);
+compat_symbol (libc, _IO_old_proc_close, _IO_proc_close, GLIBC_2_0);
+
+#endif
diff --git a/libio/oldpclose.c b/libio/oldpclose.c
index dc789c055a..447f263c0d 100644
--- a/libio/oldpclose.c
+++ b/libio/oldpclose.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998 Free Software Foundation, Inc.
+/* Copyright (C) 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
@@ -23,6 +23,9 @@
    other reasons why the executable file might be covered by the GNU
    General Public License.  */
 
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
+
 #define _IO_USE_OLD_IO_FILE
 #include "libioP.h"
 #include "stdio.h"
@@ -41,4 +44,5 @@ __old_pclose (fp)
   return _IO_old_fclose (fp);
 }
 
-symbol_version (__old_pclose, pclose, GLIBC_2.0);
+compat_symbol (libc, __old_pclose, pclose, GLIBC_2_0);
+#endif
diff --git a/libio/oldstdfiles.c b/libio/oldstdfiles.c
index 3629ab8123..0d5f763840 100644
--- a/libio/oldstdfiles.c
+++ b/libio/oldstdfiles.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1994, 1996, 1997, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1993,94,96,97,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
@@ -23,6 +23,8 @@
    other reasons why the executable file might be covered by the GNU
    General Public License.  */
 
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
 
 /* This file provides definitions of _IO_stdin, _IO_stdout, and _IO_stderr
    for C code.  Compare stdstreams.cc.
@@ -91,3 +93,5 @@ _IO_check_libio ()
 }
 
 #endif
+
+#endif
diff --git a/libio/oldtmpfile.c b/libio/oldtmpfile.c
index 048b538429..e15ae9d94e 100644
--- a/libio/oldtmpfile.c
+++ b/libio/oldtmpfile.c
@@ -51,5 +51,5 @@ __old_tmpfile (void)
   return f;
 }
 
-symbol_version (__old_tmpfile, tmpfile, GLIBC_2.0);
+compat_symbol (libc, __old_tmpfile, tmpfile, GLIBC_2_0);
 #endif