summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtchang%redhat.com <devnull@localhost>2007-01-20 20:30:53 +0000
committerwtchang%redhat.com <devnull@localhost>2007-01-20 20:30:53 +0000
commit7503851f27b64eef6e0714543c03334e13d3d4b7 (patch)
treef1dd7765a29d33d4c2d9f373dfe5e00c55361027
parent52cf7f0770ecc38bcc2d416fded2cc575f4ad279 (diff)
downloadnspr-hg-7503851f27b64eef6e0714543c03334e13d3d4b7.tar.gz
Bug 362768: implemented NSPR shared library finalization function for AIX.SUNBIRD_0_3_1_RC2MOZILLA_1_9a2_RELEASEMOZILLA_1_9a2_RC1
r=nelsonb Modified files: pr/src/Makefile.in ptthread.c Tag: NSPRPUB_PRE_4_2_CLIENT_BRANCH
-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;