summaryrefslogtreecommitdiff
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
parent54f6cbb3795fbc9c65965a88e3cd2a60d05acc6d (diff)
downloadglibc-16710d582967555671fc8f4a188bbea7432f2e7d.tar.gz
* 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.
-rw-r--r--ChangeLog21
-rw-r--r--dlfcn/dlopen.c9
-rw-r--r--dlfcn/dlopenold.c5
-rw-r--r--hurd/compat-20.c9
-rw-r--r--hurd/hurdinit.c14
-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
-rw-r--r--nss/getXXbyYY_r.c16
-rw-r--r--nss/getXXent_r.c18
21 files changed, 145 insertions, 86 deletions
diff --git a/ChangeLog b/ChangeLog
index e228669331..4655cc37c0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,26 @@
2000-03-26 Roland McGrath <roland@baalperazim.frob.com>
+ * 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.
+
* sysdeps/mach/sys/reboot.h: Include <features.h>.
(reboot): Declare it.
diff --git a/dlfcn/dlopen.c b/dlfcn/dlopen.c
index 66c43de059..76636fdba4 100644
--- a/dlfcn/dlopen.c
+++ b/dlfcn/dlopen.c
@@ -1,5 +1,5 @@
/* Load a shared object at run time.
- Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1995,96,97,98,99,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
@@ -50,8 +50,5 @@ __dlopen_check (const char *file, int mode)
return _dlerror_run (dlopen_doit, &args) ? NULL : args.new;
}
-#if defined PIC && defined DO_VERSIONING
-default_symbol_version (__dlopen_check, dlopen, GLIBC_2.1);
-#else
-weak_alias (__dlopen_check, dlopen)
-#endif
+#include <shlib-compat.h>
+versioned_symbol (libdl, __dlopen_check, dlopen, GLIBC_2_1);
diff --git a/dlfcn/dlopenold.c b/dlfcn/dlopenold.c
index bc7fd37e3f..3fc39d6999 100644
--- a/dlfcn/dlopenold.c
+++ b/dlfcn/dlopenold.c
@@ -22,7 +22,8 @@
/* This file is for compatibility with glibc 2.0. Compile it only if
versioning is used. */
-#if defined PIC && DO_VERSIONING
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libdl, GLIBC_2_0, GLIBC_2_1)
struct dlopen_args
{
@@ -58,5 +59,5 @@ __dlopen_nocheck (const char *file, int mode)
return _dlerror_run (dlopen_doit, &args) ? NULL : args.new;
}
-symbol_version (__dlopen_nocheck, dlopen, GLIBC_2.0);
+compat_symbol (libdl, __dlopen_nocheck, dlopen, GLIBC_2_0);
#endif
diff --git a/hurd/compat-20.c b/hurd/compat-20.c
index 75d51ce9f7..d48e22ac3c 100644
--- a/hurd/compat-20.c
+++ b/hurd/compat-20.c
@@ -1,5 +1,5 @@
/* Old-versioned functions for binary compatibility with glibc-2.0.
- Copyright (C) 1998 Free Software Foundation, Inc.
+ Copyright (C) 1998, 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
@@ -24,9 +24,14 @@
These definitions can be removed when the soname changes. */
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
+
void
_hurd_proc_init_compat_20 (char **argv)
{
_hurd_proc_init (argv, NULL, 0);
}
-symbol_version (_hurd_proc_init_compat_20, _hurd_proc_init, GLIBC_2.0);
+compat_symbol (libc, _hurd_proc_init_compat_20, _hurd_proc_init, GLIBC_2_0);
+
+#endif
diff --git a/hurd/hurdinit.c b/hurd/hurdinit.c
index 7e2fe01c83..2345d3472c 100644
--- a/hurd/hurdinit.c
+++ b/hurd/hurdinit.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992,93,94,95,96,97,98,99 Free Software Foundation, Inc.
+/* Copyright (C) 1992,93,94,95,96,97,98,99,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
@@ -170,16 +170,8 @@ _hurd_new_proc_init (char **argv,
__msg_sig_post (_hurd_msgport, SIGTRAP, 0, __mach_task_self ());
}
-/* XXX Remove this versioning stuff and rename __new_hurd_proc_init
- above back to _hurd_proc_init when we bump the libc soname. */
-
-#if defined PIC && DO_VERSIONING
-default_symbol_version (_hurd_new_proc_init, _hurd_proc_init, GLIBC_2.1);
-#else
-# ifdef weak_alias
-weak_alias (_hurd_new_proc_init, _hurd_proc_init)
-# endif
-#endif
+#include <shlib-compat.h>
+versioned_symbol (libc, _hurd_new_proc_init, _hurd_proc_init, GLIBC_2_1);
/* Called when we get a message telling us to change our proc server port. */
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
diff --git a/nss/getXXbyYY_r.c b/nss/getXXbyYY_r.c
index c3d2010434..230fb1a50c 100644
--- a/nss/getXXbyYY_r.c
+++ b/nss/getXXbyYY_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1996,97,98,99,2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -215,7 +215,9 @@ done:
return status == NSS_STATUS_SUCCESS ? 0 : errno;
}
-#if defined SHARED && DO_VERSIONING
+
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1_2)
#define OLD(name) OLD1 (name)
#define OLD1(name) __old_##name
@@ -233,13 +235,13 @@ OLD (REENTRANT_NAME) (ADD_PARAMS, LOOKUP_TYPE *resbuf, char *buffer,
}
#define do_symbol_version(real, name, version) \
- symbol_version(real, name, version)
-do_symbol_version(OLD (REENTRANT_NAME), REENTRANT_NAME, GLIBC_2.0);
+ compat_symbol (libc, real, name, version)
+do_symbol_version (OLD (REENTRANT_GETNAME), REENTRANT_NAME, GLIBC_2_0);
#define do_default_symbol_version(real, name, version) \
- default_symbol_version(real, name, version)
-do_default_symbol_version(INTERNAL (REENTRANT_NAME), REENTRANT_NAME,
- GLIBC_2.1.2);
+ versioned_symbol (libc, real, name, version)
+do_default_symbol_version (INTERNAL (REENTRANT_NAME),
+ REENTRANT_NAME, GLIBC_2_1_2);
#else
#define do_weak_alias(n1, n2) weak_alias (n1, n2)
do_weak_alias (INTERNAL (REENTRANT_NAME), REENTRANT_NAME)
diff --git a/nss/getXXent_r.c b/nss/getXXent_r.c
index 6f6f22ad0b..e0ba98b59a 100644
--- a/nss/getXXent_r.c
+++ b/nss/getXXent_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1996,97,98,99,2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -290,7 +290,10 @@ INTERNAL (REENTRANT_GETNAME) (LOOKUP_TYPE *resbuf, char *buffer, size_t buflen,
*result = status == NSS_STATUS_SUCCESS ? resbuf : NULL;
return status == NSS_STATUS_SUCCESS ? 0 : errno;
}
-#if defined SHARED && DO_VERSIONING
+
+
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1_2)
#define OLD(name) OLD1 (name)
#define OLD1(name) __old_##name
@@ -308,14 +311,13 @@ OLD (REENTRANT_GETNAME) (LOOKUP_TYPE *resbuf, char *buffer, size_t buflen,
}
#define do_symbol_version(real, name, version) \
- symbol_version(real, name, version)
-do_symbol_version(OLD (REENTRANT_GETNAME), REENTRANT_GETNAME,
- GLIBC_2.0);
+ compat_symbol (libc, real, name, version)
+do_symbol_version (OLD (REENTRANT_GETNAME), REENTRANT_GETNAME, GLIBC_2_0);
#define do_default_symbol_version(real, name, version) \
- default_symbol_version(real, name, version)
-do_default_symbol_version(INTERNAL (REENTRANT_GETNAME),
- REENTRANT_GETNAME, GLIBC_2.1.2);
+ versioned_symbol (libc, real, name, version)
+do_default_symbol_version (INTERNAL (REENTRANT_GETNAME),
+ REENTRANT_GETNAME, GLIBC_2_1_2);
#else
#define do_weak_alias(n1, n2) weak_alias (n1, n2)
do_weak_alias (INTERNAL (REENTRANT_GETNAME), REENTRANT_GETNAME)