Re: trouble with NGPT + Linux 2.5.40 + glibc 2.2.93

"Dr. Uwe Girlich" <[email protected]>
Newsgroups gmane.linux.ngpt.devel
Message-ID <[email protected]>
Hello list!

> ... So I post again this patch.
Now it is really included.

Bye, Uwe

--
Dr. Uwe Girlich              email: [email protected]
Philosys Software GmbH       www: www.philosys.de
Edisonstrasse 6              phone: +49 89 321407-44
D-85716 Unterschleissheim    fax: +49 89 321407-12
library-glibc23init.diff (text/plain, 1.7 KB)
diff -u -r --exclude-from=diff-exclude ngpt-2.0.3-orig/pth_lib.c ngpt-2.0.3-production/pth_lib.c
--- ngpt-2.0.3-orig/pth_lib.c	2002-09-24 17:01:27.000000000 +0200
+++ ngpt-2.0.3-production/pth_lib.c	2002-10-17 22:21:48.000000000 +0200
@@ -69,6 +69,10 @@
 #endif
 }
 
+/* prototypes for the C library entry points */
+extern int libc_internal_tsd_set(enum __libc_tsd_key_t key, const void * p);
+extern void * libc_internal_tsd_get(enum __libc_tsd_key_t key);
+
 /* initialize the package */
 int pth_init(void)
 {
@@ -280,6 +284,10 @@
     }
 
     memset(&pth_atfork_list, 0x0, PTH_ATFORK_MAX * sizeof(struct pth_atfork_st));
+    /* activate C library entry points */
+    __libc_internal_tsd_set = libc_internal_tsd_set;
+    __libc_internal_tsd_get = libc_internal_tsd_get;
+
     /* Now we're done initializing... */
     pth_initializing = FALSE;
 
diff -u -r --exclude-from=diff-exclude ngpt-2.0.3-orig/pth_tcb.c ngpt-2.0.3-production/pth_tcb.c
--- ngpt-2.0.3-orig/pth_tcb.c	2002-09-19 19:45:44.000000000 +0200
+++ ngpt-2.0.3-production/pth_tcb.c	2002-10-17 06:00:21.000000000 +0200
@@ -349,7 +353,7 @@
 
 /* Thread specific data for libc. */
 
-static int libc_internal_tsd_set(enum __libc_tsd_key_t key, const void * p)
+int libc_internal_tsd_set(enum __libc_tsd_key_t key, const void * p)
 {
     pth_t tid = pth_get_current();
 
@@ -362,9 +366,9 @@
 }
 
 int (*__libc_internal_tsd_set)(enum __libc_tsd_key_t key, const void * p)
-	= libc_internal_tsd_set;
+	= NULL;
 
-static void * libc_internal_tsd_get(enum __libc_tsd_key_t key)
+void * libc_internal_tsd_get(enum __libc_tsd_key_t key)
 {
     pth_t tid = pth_get_current();
 
@@ -376,4 +380,4 @@
 }
 
 void * (*__libc_internal_tsd_get)(enum __libc_tsd_key_t key)
-    = libc_internal_tsd_get;
+	= NULL;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.