From d6d76b2ec59512f450472e1886b3accdd4f2213e Mon Sep 17 00:00:00 2001 From: Jens-Heiner Rechtien Date: Wed, 16 Jul 2003 16:41:32 +0000 Subject: [PATCH] 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 --- desktop/source/pagein/file_image_unx.c | 16 ++++++++++++++-- 1 file 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)