aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2000-03-30 19:26:35 +0000
committerRoland McGrath <roland@gnu.org>2000-03-30 19:26:35 +0000
commit693ef46bb12bd665f0eea874dde42fc433b41f44 (patch)
treecb14d5110db6c28fe447eefd6419017653b26fc9
parent841288ec5363f5bcb68b18d9f0707e8ed4c1501f (diff)
downloadglibc-693ef46bb12bd665f0eea874dde42fc433b41f44.tar
glibc-693ef46bb12bd665f0eea874dde42fc433b41f44.tar.gz
glibc-693ef46bb12bd665f0eea874dde42fc433b41f44.tar.bz2
glibc-693ef46bb12bd665f0eea874dde42fc433b41f44.zip
2000-03-30 Roland McGrath <roland@baalperazim.frob.com>
* mach/Versions (libc: GLIBC_2.0) [SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)]: Conditionalize __vm_allocate on this. [SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2)]: Conditionalize mutex- and spinlock-related symbols on this. [!SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2)] (libc: HURD_CTHREADS_0.3): New version set. Lock-related symbols go here instead in this case. * sysdeps/mach/hurd/Versions (libc: GLIBC_2.0): Remove _cthread_exit_routine, _cthread_init_routine, cthread_keycreate, cthread_getspecific, cthread_setspecific, __libc_getspecific. * hurd/Versions [SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2)] (libc: GLIBC_2.0): Put them here instead. [!SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2)] (libc: HURD_CTHREADS_0.3): New version set. Those cthreads symbols go here instead in this case. * Versions.def (libc) [USE_IN_LIBIO]: Add HURD_CTHREADS_0.3 version.
-rw-r--r--Versions.def3
-rw-r--r--hurd/Versions34
-rw-r--r--mach/Versions16
-rw-r--r--sysdeps/mach/hurd/Versions9
4 files changed, 53 insertions, 9 deletions
diff --git a/Versions.def b/Versions.def
index 31674d4bc3..962bcf6e48 100644
--- a/Versions.def
+++ b/Versions.def
@@ -9,6 +9,9 @@ libc {
GLIBC_2.1.3
GLIBC_2.1.4
GLIBC_2.2
+%ifdef USE_IN_LIBIO
+ HURD_CTHREADS_0.3
+%endif
}
libcrypt {
GLIBC_2.0
diff --git a/hurd/Versions b/hurd/Versions
index a81bc551b2..6166e99b2b 100644
--- a/hurd/Versions
+++ b/hurd/Versions
@@ -1,5 +1,9 @@
+%define PIC
+%include <shlib-compat.h>
+
libc {
GLIBC_2.0 {
+%if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
# These few symbols are here only for binary compatibility
# with the pre-versioning libc.so.0.2 ABI. Their replacements
# are in the GLIBC_2.1 version set. When the soname changes,
@@ -7,6 +11,18 @@ libc {
__getuids;
__hurd_file_name_lookup;
_hurd_proc_init; _hurd_umask;
+%endif
+
+ # These go into a different version set if GLIBC_2.0 compatibility
+ # is not required. See below.
+%if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2)
+ # variables used for detecting cthreads
+ _cthread_exit_routine; _cthread_init_routine;
+
+ # cthreads functions with stubs in libc
+ cthread_keycreate; cthread_getspecific; cthread_setspecific;
+ __libc_getspecific;
+%endif
# necessary for the Hurd brk implementation
_end;
@@ -80,7 +96,7 @@ libc {
hurd_safe_memmove; hurd_safe_memset;
hurd_sig_post;
hurd_thread_cancel; hurd_thread_self;
- hurd_unpreemt_signals;
+ hurd_unpreempt_signals;
# o*
openport;
@@ -108,8 +124,10 @@ libc {
seteuids;
}
GLIBC_2.1.3 {
+%if SHLIB_COMPAT (libc, GLIBC_2_1_3, HURD_CTHREADS_0_3)
# c*
cthread_fork; cthread_detach;
+%endif
# d*
directory_name_split;
@@ -117,4 +135,18 @@ libc {
# h*
hurd_directory_name_split;
}
+
+%if !SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2)
+ HURD_CTHREADS_0.3 {
+ # weak refs to libthreads functions that libc calls iff libthreads in use
+ cthread_fork; cthread_detach;
+
+ # variables used for detecting cthreads
+ _cthread_exit_routine; _cthread_init_routine;
+
+ # cthreads functions with stubs in libc
+ cthread_keycreate; cthread_getspecific; cthread_setspecific;
+ __libc_getspecific;
+ }
+%endif
}
diff --git a/mach/Versions b/mach/Versions
index cb282bda15..2adf2820e8 100644
--- a/mach/Versions
+++ b/mach/Versions
@@ -1,9 +1,14 @@
+%define PIC
+%include <shlib-compat.h>
+
libc {
GLIBC_2.0 {
+%if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
# This symbol is here only for binary compatibility with the
# pre-versioning libc.so.0.2 ABI. When the soname changes,
# it can be removed.
__vm_allocate;
+%endif
# variables used in Mach-specific macros
__mach_task_self_;
@@ -11,10 +16,12 @@ libc {
# functions used in inline functions and macros
__mach_port_deallocate; __mach_thread_self;
+%if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2)
__mutex_init; __mutex_lock; __mutex_lock_solid; __mutex_trylock;
__mutex_unlock; __mutex_unlock_solid;
__spin_lock; __spin_lock_init; __spin_lock_solid; __spin_try_lock;
__spin_unlock;
+%endif
# functions used by RPC stubs
__mach_msg;
@@ -55,4 +62,13 @@ libc {
task_create; task_set_special_port; task_suspend; task_terminate;
thread_depress_abort; thread_switch;
}
+
+%if !SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2)
+ HURD_CTHREADS_0.3 {
+ __mutex_init; __mutex_lock; __mutex_lock_solid; __mutex_trylock;
+ __mutex_unlock; __mutex_unlock_solid;
+ __spin_lock; __spin_lock_init; __spin_lock_solid; __spin_try_lock;
+ __spin_unlock;
+ }
+%endif
}
diff --git a/sysdeps/mach/hurd/Versions b/sysdeps/mach/hurd/Versions
index 9a08c414fd..863fa5069b 100644
--- a/sysdeps/mach/hurd/Versions
+++ b/sysdeps/mach/hurd/Versions
@@ -1,12 +1,5 @@
libc {
GLIBC_2.0 {
- # variables used for detecting cthreads
- _cthread_exit_routine; _cthread_init_routine;
-
- # cthreads functions with stubs in libc
- cthread_keycreate; cthread_getspecific; cthread_setspecific;
- __libc_getspecific;
-
# functions with a weak definition in the dynamic linker
__getcwd; __mmap;
}
@@ -27,6 +20,6 @@ ld.so {
__close; __fxstat; __getcwd; __getpid; __libc_read; __libc_write;
__lseek; __mmap; __open; __xstat;
_exit; _hurd_intr_rpc_mach_msg;
- abort;
+ abort;
}
}