summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2008-09-04 06:10:51 +0000
committerRüdiger Timm <rt@openoffice.org>2008-09-04 06:10:51 +0000
commitb19462a19e9aadf592521aa02df123b3826cf428 (patch)
tree10a554e0c28a8bb5c1d3c18b190a58d7812a5b9c /sal
parent0a0304e5e07fc91f329c8cb736ed16a95beefa27 (diff)
INTEGRATION: CWS hotmac_DEV300 (1.6.4.1.8); FILE MERGED
2008/08/27 07:43:21 kr 1.6.4.1.8.1: #i92388#
Diffstat (limited to 'sal')
-rw-r--r--sal/rtl/source/alloc_global.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/sal/rtl/source/alloc_global.c b/sal/rtl/source/alloc_global.c
index 3215b6e66f18..ee3a83e690ab 100644
--- a/sal/rtl/source/alloc_global.c
+++ b/sal/rtl/source/alloc_global.c
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: alloc_global.c,v $
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
* This file is part of OpenOffice.org.
*
@@ -149,7 +149,18 @@ rtl_memory_init (void)
/* ================================================================= */
-#if defined(__GNUC__)
+/*
+ Issue http://udk.openoffice.org/issues/show_bug.cgi?id=92388
+
+ Mac OS X does not seem to support "__cxa__atexit", thus leading
+ to the situation that "__attribute__((destructor))__" functions
+ (in particular "rtl_memory_fini") become called _before_ global
+ C++ object d'tors.
+
+ Delegated the call to "rtl_memory_fini" into a dummy C++ object,
+ see memory_fini.cxx .
+*/
+#if defined(__GNUC__) && !defined(MACOSX)
static void rtl_memory_fini (void) __attribute__((destructor));
#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
#pragma fini(rtl_memory_fini)