summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2003-07-16 16:41:32 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2003-07-16 16:41:32 +0000
commitd6d76b2ec59512f450472e1886b3accdd4f2213e (patch)
tree5cce4fe1155c0b4146e2ea0b0846c132c9598cbe /desktop
parent23ae82b91505e06ad7d32de4f312f711e96fc3f9 (diff)
INTEGRATION: CWS ooo11rc2 (1.2.28); FILE MERGED
2003/07/15 03:35:39 fa 1.2.28.1: Fixes for darwin/DYLD_LIBRARY_PATH in scripts, also in d.lst for dylib delivery, and in the pagein stuff for OS X. http://www.openoffice.org/issues/show_bug.cgi?id=16858 Contributor: Kevin Hendricks Dan fa@ooo
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/pagein/file_image_unx.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/desktop/source/pagein/file_image_unx.c b/desktop/source/pagein/file_image_unx.c
index f77bb4db7364..69f33b6447be 100644
--- a/desktop/source/pagein/file_image_unx.c
+++ b/desktop/source/pagein/file_image_unx.c
@@ -2,9 +2,9 @@
*
* $RCSfile: file_image_unx.c,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: vg $ $Date: 2003-06-04 10:43:11 $
+ * last change: $Author: hr $ $Date: 2003-07-16 17:41:32 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -132,10 +132,22 @@ int file_image_pagein (file_image * image)
return (0);
if (madvise (w.m_base, w.m_size, MADV_WILLNEED) == -1)
+ {
+#ifndef MACOSX
return (errno);
+#else
+ /* madvise MADV_WILLNEED need not succeed here */
+ /* but that is fine */
+#endif
+ }
+
+#ifndef MACOSX
if ((s = sysconf (_SC_PAGESIZE)) == -1)
s = 0x1000;
+#else
+ s = getpagesize();
+#endif
k = (size_t)(s);
while (w.m_size > k)