summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pr/src/Makefile.in1
-rw-r--r--pr/src/pthreads/ptthread.c13
2 files changed, 12 insertions, 2 deletions
diff --git a/pr/src/Makefile.in b/pr/src/Makefile.in
index f6fd8886..66d887ed 100644
--- a/pr/src/Makefile.in
+++ b/pr/src/Makefile.in
@@ -119,6 +119,7 @@ OS_LIBS += -lc
endif
ifeq ($(OS_ARCH),AIX)
+DSO_LDOPTS += -binitfini::_PR_Fini
OS_LIBS = -lodm -lcfg
ifeq ($(CLASSIC_NSPR),1)
ifeq ($(OS_RELEASE),4.1)
diff --git a/pr/src/pthreads/ptthread.c b/pr/src/pthreads/ptthread.c
index 1c499908..96999dfd 100644
--- a/pr/src/pthreads/ptthread.c
+++ b/pr/src/pthreads/ptthread.c
@@ -941,10 +941,19 @@ void _PR_InitThreads(
*/
static void _PR_Fini(void) __attribute__ ((destructor));
#elif defined(__SUNPRO_C)
+/*
+ * Sun Studio compiler
+ */
#pragma fini(_PR_Fini)
+static void _PR_Fini(void);
#elif defined(HPUX)
+/*
+ * Current versions of HP C compiler define __HP_cc.
+ * HP C compiler A.11.01.20 doesn't define __HP_cc.
+ */
#if defined(__ia64) || defined(_LP64)
#pragma FINI "_PR_Fini"
+static void _PR_Fini(void);
#else
/*
* Only HP-UX 10.x style initializers are supported in 32-bit links.
@@ -974,10 +983,10 @@ void PR_HPUX10xInit(shl_t handle, int loading)
}
#endif
#elif defined(AIX)
-/* Need to use the binitfini::_PR_Fini linker option. */
+/* Need to use the -binitfini::_PR_Fini linker option. */
#endif
-static void _PR_Fini(void)
+void _PR_Fini(void)
{
void *thred;
int rv;