summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2006-05-04 07:48:55 +0000
committerRüdiger Timm <rt@openoffice.org>2006-05-04 07:48:55 +0000
commit78269766b1368b4306c274437117f7d4319c077b (patch)
tree52bf0508004b60454cec68a5b8fc0f78c0e4f06d /sal
parent89bb81879448b9534113e9acd06f56c08e62ebf7 (diff)
INTEGRATION: CWS pj54 (1.9.90); FILE MERGED
2006/04/25 11:04:33 pjanik 1.9.90.1: #i64421#: Use /tmp instead of /var/tmp on Mac OS X.
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/tempfile.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/sal/osl/unx/tempfile.c b/sal/osl/unx/tempfile.c
index 9a8109af9bb5..b5233b7d5ec2 100644
--- a/sal/osl/unx/tempfile.c
+++ b/sal/osl/unx/tempfile.c
@@ -4,9 +4,9 @@
*
* $RCSfile: tempfile.c,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: rt $ $Date: 2005-09-08 15:02:25 $
+ * last change: $Author: rt $ $Date: 2006-05-04 08:48:55 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -73,16 +73,27 @@
oslFileError SAL_CALL osl_getTempDirURL( rtl_uString** pustrTempDir )
{
+#ifdef MACOSX
+ const char *pValue = getenv( "TMPDIR" );
+
+ /* If TMPDIR environment variable is not set, use "/tmp" instead
+ of P_tmpdir because its value is "/var/tmp" and it is not
+ deleted on system start up */
+ if ( !pValue )
+ pValue = "/tmp";
+#else
+
const char *pValue = getenv( "TEMP" );
if ( !pValue )
{
pValue = getenv( "TMP" );
-#if defined(SOLARIS) || defined (LINUX) || defined (FREEBSD) || defined (MACOSX)
+#if defined(SOLARIS) || defined (LINUX) || defined (FREEBSD)
if ( !pValue )
pValue = P_tmpdir;
#endif
}
+#endif /* MACOSX */
if ( pValue )
{