[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH] Provide GLIBC_2.0 pthread_create and pthread_attr_init (and make Evolution and Apache2 work!)



LinuxThreads provides these symbols in two versions because since in
GLIBC_2_1 the pthread_attr_t structure was enlarged, doing so allowed
to save a tiny bit of memory.

In NPTL the layout of pthread_attr_t has been incompatibly changed, so
this doesn't make much sense.
Thus, this patch simply aliases the GLIBC_2_0 symbols to the GLIBC_2_1
ones.

Note that programs directly accessing pthread_attr_t are broken. I
don't think it's worth to fix this unless some really important
program suffers from this.

Now Apache2 and Evolution (including summary) work! (along with the
ones I previously listed)


--- nptl/pthread_attr_init.c~	2002-09-19 11:57:29.000000000 +0200
+++ nptl/pthread_attr_init.c	2002-11-01 11:27:03.000000000 +0100
@@ -65,13 +65,8 @@ versioned_symbol (libpthread, __pthread_
 
 
 #if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_1)
-int
-__pthread_attr_init_2_0 (attr)
-     pthread_attr_t *attr;
-{
-  return ENOSYS;
-}
+strong_alias(__pthread_attr_init_2_1, __pthread_attr_init_2_0);
 compat_symbol (libpthread, __pthread_attr_init_2_0, pthread_attr_init,
 	       GLIBC_2_0);
 #endif
--- nptl/pthread_create.c~	2002-11-01 03:42:43.000000000 +0100
+++ nptl/pthread_create.c	2002-11-01 11:26:45.000000000 +0100
@@ -380,15 +380,7 @@ versioned_symbol (libpthread, __pthread_
 
 
 #if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_1)
-int
-__pthread_create_2_0 (newthread, attr, start_routine, arg)
-     pthread_t *newthread;
-     const pthread_attr_t *attr;
-     void *(*start_routine) (void *);
-     void *arg;
-{
-  return ENOSYS;
-}
+strong_alias(__pthread_create_2_1, __pthread_create_2_0);
 compat_symbol (libpthread, __pthread_create_2_0, pthread_create,
 	       GLIBC_2_0);
 #endif

Attachment: pgp00016.pgp
Description: PGP signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]