-Hi all,

For what its worth, the below script is my (failed) attempt at building OOo (DEV300m60) on Mac OS X Snow Leopard (10.6). Maybe somebody finds this helpful. Some remarks:

- 10.6 defaults to building 64 bit objects. To not fight too many things simultaneously, I sticked with building a 32 bit OOo. Required a number of patches to stick -m32 into CC etc. and pass this down to lpsolve.

- Similarly, MacPorts (used for the dependencies) defaults to 64 bit now. However, +universal allows to build the necessary libraries for both 32 and 64 bit. (Generally, not all parts of MacPorts work with 10.6 yet, but those that are needed here luckily do.)

- The 10.6 default GCC 4.2.1 is diagnosed by configure to have the -fvisibility=hidden bug. This can cause problems at runtime and has to be evaluated further.

- OOo is now explicitly built against the MacOSX10.4u.sdk (so that it runs on Tiger even if it is built on Leopard). However, 10.6, at least by default, does not include the 10.4 SDK. Worked around that for now by patching places that ask for MacOSX10.4u.sdk to use MacOSX10.6.sdk instead.

- The GCC version warns about places where a printf-style format string is not constant and not followed by further arguments (i.e., printf(s) instead of printf("%s", s), failing if s contains percent signs). Required a number of trivial patches.

- The GCC version warns about some places in Objective C where "class 'X' does not implement the 'Y' protocol." Silenced those for now with patches switching off -Werror locally.

- The GCC version warns about places where cases within a switch jump past variable declarations. Required a number of trivial patches.

- The GCC version defines memmove as something built in. Required a number of patches to treat a defined memmove similar to defined __GLIBC__ etc. (where obviously the same happens).

- The GCC version no longer understands the old Apple extension of -Wlong-double. Required a number of patches to just remove it.

- The GCC version and/or the SDK are picky about a const pointer issue at one place in moz. Required a trivial patch.

- nss and moz wanted to build their own sqlite, though MACOSX defaults to using system sqlite. Strange. Required a number of patches.

- One place in UCB erroneously made code conditional on "GCC_VERSION > 40201" instead of "GCC_VERSION >= 40201." Required a trivial patch.

- The GCC version is picky about class member declarations that are (illegally) qualified with the class name. Required a number of trivial patches.

- The GCC version warns about unused global variables. Required a trivial patch to just remove them.

- There are warnings about deprecated SDK stuff, which, interestingly enough, -Wno-deprecated (or whatever it is called) would not silence. Silenced for now with patches switching off -Werror locally.

- One place in vcl/aqua/source/app/vclnsapp.mm warns about "pFrame->getWindow()" not supporting the windowShouldClose message. Worked around that for now with a patch that casts the receiver to a SalFrameWindow pointer.

- And, finally, smoketestoo_native fails with a crashing soffice. :( This needs to be debugged further...

-Stephan



#!/bin/bash
set -ev

# On Mac OS X 10.6.1 (including Xcode 3.2):
# - install MacPorts 1.8.0
# (<http://distfiles.macports.org/MacPorts/MacPorts-1.8.0-10.6-SnowLeopard.dmg>)
# sudo /opt/local/bin/port selfupdate
# sudo /opt/local/bin/port install libidl +universal
# sudo /opt/local/bin/port install mercurial pkgconfig wget

mkdir DEV300m60

mkdir DEV300m60/pkgconfig
ln -s /opt/local/lib/pkgconfig/glib-2.0.pc DEV300m60/pkgconfig/
ln -s /opt/local/lib/pkgconfig/libIDL-2.0.pc DEV300m60/pkgconfig/
export PKG_CONFIG=/opt/local/bin/pkg-config \
 PKG_CONFIG_LIBDIR=$PWD/DEV300m60/pkgconfig

/opt/local/bin/hg clone -r DEV300_m60 \
 http://hg.services.openoffice.org/hg/DEV300 DEV300m60/ooo
/opt/local/bin/wget \
 http://tools.openoffice.org/unowinreg_prebuild/680/unowinreg.dll \
 -P DEV300m60/ooo/external/unowinreg
/opt/local/bin/wget \
 
ftp://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/1.1.14/seamonkey-1.1.14.source.tar.bz2
 \
 -P DEV300m60/ooo/moz/download

patch -d DEV300m60/ooo -p 1 <<\EOF
diff -r 5fa7b2f73638 basic/source/app/msgedit.cxx
--- a/basic/source/app/msgedit.cxx      Thu Sep 24 12:58:01 2009 +0000
+++ b/basic/source/app/msgedit.cxx      Fri Sep 25 20:47:45 2009 +0200
@@ -220,7 +220,7 @@
                 // restore Original Msg
                 LogMsg->aDebugData.aMsg = aOriginalMsg;
- printf( ByteString( aPrintMsg, RTL_TEXTENCODING_UTF8 ).GetBuffer() );
+                printf( "%s", ByteString( aPrintMsg, RTL_TEXTENCODING_UTF8 
).GetBuffer() );
             }
         }
        }
diff -r 5fa7b2f73638 cpputools/source/unoexe/unoexe.cxx
--- a/cpputools/source/unoexe/unoexe.cxx        Thu Sep 24 12:58:01 2009 +0000
+++ b/cpputools/source/unoexe/unoexe.cxx        Fri Sep 25 20:47:45 2009 +0200
@@ -134,7 +134,7 @@
 static inline void out( const sal_Char * pText )
 {
     if (! s_quiet)
-        fprintf( stderr, pText );
+        fprintf( stderr, "%s", pText );
 }
 
//--------------------------------------------------------------------------------------------------
 static inline void out( const OUString & rText )
@@ -142,7 +142,7 @@
     if (! s_quiet)
     {
         OString aText( OUStringToOString( rText, RTL_TEXTENCODING_ASCII_US ) );
-        fprintf( stderr, aText.getStr() );
+        fprintf( stderr, "%s", aText.getStr() );
     }
 }
diff -r 5fa7b2f73638 dtrans/prj/build.lst
--- a/extensions/source/logging/consolehandler.cxx      Thu Sep 24 12:58:01 
2009 +0000
+++ b/extensions/source/logging/consolehandler.cxx      Fri Sep 25 20:47:45 
2009 +0200
@@ -252,9 +252,9 @@
             return sal_False;
if ( _rRecord.Level >= m_nThreshold )
-            fprintf( stderr, sEntry.getStr() );
+            fprintf( stderr, "%s", sEntry.getStr() );
         else
-            fprintf( stdout, sEntry.getStr() );
+            fprintf( stdout, "%s", sEntry.getStr() );
return sal_True;
     }
diff -r 5fa7b2f73638 extensions/source/macosx/spotlight/OOoContentDataParser.m
--- a/extensions/source/macosx/spotlight/OOoContentDataParser.m Thu Sep 24 
12:58:01 2009 +0000
+++ b/extensions/source/macosx/spotlight/OOoContentDataParser.m Fri Sep 25 
20:47:45 2009 +0200
@@ -113,9 +113,9 @@
 - (void)parser:(NSXMLParser *)parser parseErrorOccurred:(NSError *)parseError
 {
     //NSLog(@"parsing finished with error");
- NSLog([NSString stringWithFormat:@"An error occured parsing the document. (Error %i, Description: %@, Line: %i, Column: %i)", [parseError code], + NSLog(@"An error occured parsing the document. (Error %i, Description: %@, Line: %i, Column: %i)", [parseError code], [[parser parserError] localizedDescription], [parser lineNumber],
-        [parser columnNumber]]);
+        [parser columnNumber]);
if (runningTextContent != nil) {
         [runningTextContent release];
diff -r 5fa7b2f73638 extensions/source/macosx/spotlight/OOoMetaDataParser.m
--- a/extensions/source/macosx/spotlight/OOoMetaDataParser.m    Thu Sep 24 
12:58:01 2009 +0000
+++ b/extensions/source/macosx/spotlight/OOoMetaDataParser.m    Fri Sep 25 
20:47:45 2009 +0200
@@ -195,9 +195,9 @@
 - (void)parser:(NSXMLParser *)parser parseErrorOccurred:(NSError *)parseError
 {
     //NSLog(@"parsing finished with error");
- NSLog([NSString stringWithFormat:@"Error %i, Description: %@, Line: %i, Column: %i", [parseError code], + NSLog(@"Error %i, Description: %@, Line: %i, Column: %i", [parseError code], [[parser parserError] localizedDescription], [parser lineNumber],
-        [parser columnNumber]]);
+        [parser columnNumber]);
 }
@end
diff -r 5fa7b2f73638 extensions/source/macosx/spotlight/makefile.mk
--- a/extensions/source/macosx/spotlight/makefile.mk    Thu Sep 24 12:58:01 
2009 +0000
+++ b/extensions/source/macosx/spotlight/makefile.mk    Fri Sep 25 20:47:45 
2009 +0200
@@ -33,6 +33,9 @@
 PRJNAME=extensions
 TARGET=spotlightplugin
+EXTERNAL_WARNINGS_NOT_ERRORS = TRUE
+    # class 'X' does not implement the 'Y' protocol
+
 # --- Settings ----------------------------------
 .INCLUDE : settings.mk
diff -r 5fa7b2f73638 fpicker/source/aqua/CFStringUtilities.cxx
--- a/fpicker/source/aqua/CFStringUtilities.cxx Thu Sep 24 12:58:01 2009 +0000
+++ b/fpicker/source/aqua/CFStringUtilities.cxx Fri Sep 25 20:47:45 2009 +0200
@@ -94,21 +94,25 @@
             CFRetain(sURLString);
             break;
         case FILENAME:
-            OSL_TRACE("Extracting the file name of an item");
-            CFStringRef fullString = CFURLGetString(aUrlRef);
-            CFURLRef dirRef = 
CFURLCreateCopyDeletingLastPathComponent(NULL,aUrlRef);
-            CFIndex dirLength = CFStringGetLength(CFURLGetString(dirRef));
-            CFRelease(dirRef);
-            CFIndex fullLength = CFStringGetLength(fullString);
-            CFRange substringRange = CFRangeMake(dirLength, fullLength - 
dirLength);
-            sURLString = CFStringCreateWithSubstring(NULL, fullString, 
substringRange);
+            {
+                OSL_TRACE("Extracting the file name of an item");
+                CFStringRef fullString = CFURLGetString(aUrlRef);
+                CFURLRef dirRef = 
CFURLCreateCopyDeletingLastPathComponent(NULL,aUrlRef);
+                CFIndex dirLength = CFStringGetLength(CFURLGetString(dirRef));
+                CFRelease(dirRef);
+                CFIndex fullLength = CFStringGetLength(fullString);
+                CFRange substringRange = CFRangeMake(dirLength, fullLength - 
dirLength);
+                sURLString = CFStringCreateWithSubstring(NULL, fullString, 
substringRange);
+            }
             break;
         case PATHWITHOUTLASTCOMPONENT:
-            OSL_TRACE("Extracting the last but one component of an item's 
path");
-            CFURLRef directoryRef = 
CFURLCreateCopyDeletingLastPathComponent(NULL,aUrlRef);
-            sURLString = CFURLGetString(directoryRef);
-            CFRetain(sURLString);
-            CFRelease(directoryRef);
+            {
+                OSL_TRACE("Extracting the last but one component of an item's 
path");
+                CFURLRef directoryRef = 
CFURLCreateCopyDeletingLastPathComponent(NULL,aUrlRef);
+                sURLString = CFURLGetString(directoryRef);
+                CFRetain(sURLString);
+                CFRelease(directoryRef);
+            }
             break;
         default:
             break;
diff -r 5fa7b2f73638 fpicker/source/aqua/NSURL_OOoAdditions.mm
--- a/fpicker/source/aqua/NSURL_OOoAdditions.mm Thu Sep 24 12:58:01 2009 +0000
+++ b/fpicker/source/aqua/NSURL_OOoAdditions.mm Fri Sep 25 20:47:45 2009 +0200
@@ -48,28 +48,32 @@
             [sURLString retain];
             break;
         case FILENAME:
-            OSL_TRACE("Extracting the file name of an item");
-            NSString *path = [self path];
-            if (path == nil) {
-                sURLString = @"";
+            {
+                OSL_TRACE("Extracting the file name of an item");
+                NSString *path = [self path];
+                if (path == nil) {
+                    sURLString = @"";
+                }
+                else {
+                    sURLString = [path lastPathComponent];
+                }
+                [sURLString retain];
             }
-            else {
-                sURLString = [path lastPathComponent];
-            }
-            [sURLString retain];
             break;
         case PATHWITHOUTLASTCOMPONENT:
-            OSL_TRACE("Extracting the last but one component of an item's 
path");
-            path = [self absoluteString];
-            if (path == nil) {
-                sURLString = @"";
+            {
+                OSL_TRACE("Extracting the last but one component of an item's 
path");
+                NSString *path = [self absoluteString];
+                if (path == nil) {
+                    sURLString = @"";
+                }
+                else {
+                    NSString* lastComponent = [path lastPathComponent];
+                    unsigned int lastLength = [lastComponent length];
+                    sURLString = [path substringToIndex:([path length] - 
lastLength)];
+                }
+                [sURLString retain];
             }
-            else {
-                NSString* lastComponent = [path lastPathComponent];
-                unsigned int lastLength = [lastComponent length];
-                sURLString = [path substringToIndex:([path length] - 
lastLength)];
-            }
-            [sURLString retain];
             break;
         default:
             break;
diff -r 5fa7b2f73638 fpicker/source/aqua/SalAquaPicker.cxx
--- a/fpicker/source/aqua/SalAquaPicker.cxx     Thu Sep 24 12:58:01 2009 +0000
+++ b/fpicker/source/aqua/SalAquaPicker.cxx     Fri Sep 25 20:47:45 2009 +0200
@@ -117,23 +117,25 @@
             break;
case NAVIGATIONSERVICES_SAVE:
-            OSL_TRACE("NAVIGATIONSERVICES_SAVE");
-            m_pDialog = [NSSavePanel savePanel];
-            [(NSSavePanel*)m_pDialog setCanSelectHiddenExtension:NO]; 
//changed for issue #102102
-            /* I would have loved to use
-             * [(NSSavePanel*)m_pDialog setExtensionHidden:YES];
-             * here but unfortunately this
-             * a) only works when the dialog is already displayed because it 
seems to act on the corresponding checkbox (that we don't show but that doesn't 
matter)
-             * b) Mac OS X saves this setting on an application-based level 
which means that the last state is always being restored again when the app 
runs for the next time
- * - * So the only reliable way seems to be using the NSUserDefaults object because that is where that value is stored and
-             * to just overwrite it if it has the wrong value.
-             */
-            NSUserDefaults *pDefaults = [NSUserDefaults standardUserDefaults];
-            NSNumber *pExtn = [pDefaults 
objectForKey:kSetHideExtensionStateKey];
-            if(pExtn == nil || [pExtn boolValue] == NO) {
-                OSL_TRACE("Hiding extension");
-                [pDefaults setBool:YES forKey:kSetHideExtensionStateKey];
+            {
+                OSL_TRACE("NAVIGATIONSERVICES_SAVE");
+                m_pDialog = [NSSavePanel savePanel];
+                [(NSSavePanel*)m_pDialog setCanSelectHiddenExtension:NO]; 
//changed for issue #102102
+                /* I would have loved to use
+                 * [(NSSavePanel*)m_pDialog setExtensionHidden:YES];
+                 * here but unfortunately this
+                 * a) only works when the dialog is already displayed because 
it seems to act on the corresponding checkbox (that we don't show but that 
doesn't matter)
+                 * b) Mac OS X saves this setting on an application-based 
level which means that the last state is always being restored again when the 
app runs for the next time
+ * + * So the only reliable way seems to be using the NSUserDefaults object because that is where that value is stored and
+                 * to just overwrite it if it has the wrong value.
+                 */
+                NSUserDefaults *pDefaults = [NSUserDefaults 
standardUserDefaults];
+                NSNumber *pExtn = [pDefaults 
objectForKey:kSetHideExtensionStateKey];
+                if(pExtn == nil || [pExtn boolValue] == NO) {
+                    OSL_TRACE("Hiding extension");
+                    [pDefaults setBool:YES forKey:kSetHideExtensionStateKey];
+                }
             }
             break;
diff -r 5fa7b2f73638 fpicker/source/aqua/makefile.mk
--- a/fpicker/source/aqua/makefile.mk   Thu Sep 24 12:58:01 2009 +0000
+++ b/fpicker/source/aqua/makefile.mk   Fri Sep 25 20:47:45 2009 +0200
@@ -37,6 +37,9 @@
 LIBTARGET=NO
 ENABLE_EXCEPTIONS=TRUE
+EXTERNAL_WARNINGS_NOT_ERRORS = TRUE
+    # class 'X' does not implement the 'Y' protocol
+
 # --- Settings -----------------------------------------------------
.INCLUDE : settings.mk
diff -r 5fa7b2f73638 idlc/source/preproc/unix.c
--- a/idlc/source/preproc/unix.c        Thu Sep 24 12:58:01 2009 +0000
+++ b/idlc/source/preproc/unix.c        Fri Sep 25 20:47:45 2009 +0200
@@ -218,7 +218,8 @@
 /* memmove is defined here because some vendors don't provide it at
    all and others do a terrible job (like calling malloc) */
-#if !defined(__IBMC__) && !defined(WNT) && !defined(__GLIBC__)
+#if !defined(__IBMC__) && !defined(WNT) && !defined(__GLIBC__) && \
+    !defined(memmove)
void *
     memmove(void *dp, const void *sp, size_t n)
diff -r 5fa7b2f73638 lpsolve/lp_solve_5.5.patch
--- a/lpsolve/lp_solve_5.5.patch        Thu Sep 24 12:58:01 2009 +0000
+++ b/lpsolve/lp_solve_5.5.patch        Fri Sep 25 20:47:45 2009 +0200
@@ -26,7 +26,10 @@
 +rm *.o 2>/dev/null
 --- misc/lp_solve_5.5/lpsolve55/ccc.osx        Thu Jun 23 22:53:08 2005
 +++ misc/build/lp_solve_5.5/lpsolve55/ccc.osx  Wed May 21 17:19:56 2008
-@@ -3,6 +3,10 @@
+@@ -1,8 +1,12 @@
+ src='../lp_MDO.c ../shared/commonlib.c ../shared/mmio.c ../shared/myblas.c 
../ini.c ../fortify.c ../colamd/colamd.c ../lp_rlp.c ../lp_crash.c 
../bfp/bfp_LUSOL/lp_LUSOL.c ../bfp/bfp_LUSOL/LUSOL/lusol.c ../lp_Hash.c 
../lp_lib.c ../lp_wlp.c ../lp_matrix.c ../lp_mipbb.c ../lp_MPS.c ../lp_params.c 
../lp_presolve.c ../lp_price.c ../lp_pricePSE.c ../lp_report.c ../lp_scale.c 
../lp_simplex.c ../lp_SOS.c ../lp_utils.c ../yacc_read.c'
+-c=cc
++c=$CC
def=
  so=
@@ -39,7 +42,8 @@
  else dl=-ldl
 @@ -11,13 +15,13 @@
- opts='-idirafter /usr/include/sys -O3 -DINTEGERTIME -Wno-long-double'
+-opts='-idirafter /usr/include/sys -O3 -DINTEGERTIME -Wno-long-double'
++opts='-idirafter /usr/include/sys -O3 -DINTEGERTIME'
-$c -s -c -I.. -I../shared -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd $opts $def -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src
 +$c $extra_cflags -s -c -I.. -I../shared -I../bfp -I../bfp/bfp_LUSOL 
-I../bfp/bfp_LUSOL/LUSOL -I../colamd $opts $def -DYY_NEVER_INTERACTIVE 
-DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine 
$extra_cdefs $src
diff -r 5fa7b2f73638 moz/extractfiles.mk
--- a/moz/extractfiles.mk       Thu Sep 24 12:58:01 2009 +0000
+++ b/moz/extractfiles.mk       Fri Sep 25 20:47:45 2009 +0200
@@ -67,8 +67,10 @@
        plds4 \
        smime3 \
        softokn3 \
-       sqlite3 \
        ssl3
+.IF "$(OS)" != "MACOSX"
+NSS_MODULE_RUNTIME_LIST +:= sqlite
+.ENDIF
BIN_RUNTIMELIST= \
        xpcom \
diff -r 5fa7b2f73638 moz/makefile.mk
--- a/moz/makefile.mk   Thu Sep 24 12:58:01 2009 +0000
+++ b/moz/makefile.mk   Fri Sep 25 20:47:45 2009 +0200
@@ -144,7 +144,7 @@
.IF "$(GUI)"=="UNX"
 .IF "$(GUIBASE)"=="aqua"
-MACDEVSDK*=/Developer/SDKs/MacOSX10.4u.sdk
+MACDEVSDK*=/Developer/SDKs/MacOSX10.6.sdk
 MOZILLA_CONFIGURE_FLAGS+= \
        --with-macos-sdk=$(MACDEVSDK) \
        --disable-glibtest \
diff -r 5fa7b2f73638 moz/seamonkey-source-1.1.14.patch
--- a/moz/seamonkey-source-1.1.14.patch Thu Sep 24 12:58:01 2009 +0000
+++ b/moz/seamonkey-source-1.1.14.patch Fri Sep 25 20:47:45 2009 +0200
@@ -6291,6 +6291,17 @@
EXTRA_DEPS = \
                        $(XP_DIST_DEP_LIBS) \
+--- misc/mozilla/widget/src/mac/nsMacWindow.cpp        2007-11-19 
21:40:08.000000000 +0100
++++ misc/build/mozilla/widget/src/mac/nsMacWindow.cpp  2009-09-09 
20:48:48.000000000 +0200
+@@ -88,7 +88,7 @@
+                                              WindowTransitionAction,
+                                              const HIRect*,
+                                              Boolean,
+-                                             TransitionWindowOptions*);
++                                             const TransitionWindowOptions*);
+ + static const char sScreenManagerContractID[] = "@mozilla.org/gfx/screenmanager;1"; + --- misc/mozilla/xpcom/reflect/xptinfo/public/xptinfo.h 2004-04-18 16:18:20.000000000 +0200
 +++ misc/build/mozilla/xpcom/reflect/xptinfo/public/xptinfo.h  2008-08-14 
16:22:21.000000000 +0200
 @@ -132,7 +132,7 @@
diff -r 5fa7b2f73638 nss/makefile.mk
--- a/nss/makefile.mk   Thu Sep 24 12:58:01 2009 +0000
+++ b/nss/makefile.mk   Fri Sep 25 20:47:45 2009 +0200
@@ -81,7 +81,11 @@
 OUT2LIB=dist$/out$/lib$/*$(DLLPOST)
BUILD_DIR=security$/nss
+.IF "$(OS)"=="MACOSX"
+BUILD_ACTION= NSS_USE_SYSTEM_SQLITE=1 $(GNUMAKE) nss_build_all
+.ELSE
 BUILD_ACTION= $(GNUMAKE) nss_build_all
+.ENDIF
.ENDIF # "$(GUI)"=="UNX" diff -r 5fa7b2f73638 rsc/source/prj/start.cxx
--- a/rsc/source/prj/start.cxx  Thu Sep 24 12:58:01 2009 +0000
+++ b/rsc/source/prj/start.cxx  Fri Sep 25 20:47:45 2009 +0200
@@ -244,7 +244,7 @@
 #ifdef OS2
                fprintf( fRspFile, "%s\n", aSrsName.GetBuffer() );
 #else
-               fprintf( fRspFile, aSrsName.GetBuffer() );
+               fprintf( fRspFile, "%s", aSrsName.GetBuffer() );
 #endif
pString = pInputList->First();
diff -r 5fa7b2f73638 sfx2/source/appl/makefile.mk
--- a/sfx2/source/appl/makefile.mk      Thu Sep 24 12:58:01 2009 +0000
+++ b/sfx2/source/appl/makefile.mk      Fri Sep 25 20:47:45 2009 +0200
@@ -36,6 +36,11 @@
 ENABLE_EXCEPTIONS=TRUE
 LIBTARGET=NO
+.IF "$(OS)" == "MACOSX"
+EXTERNAL_WARNINGS_NOT_ERRORS = TRUE
+    # class 'X' does not implement the 'Y' protocol
+.ENDIF
+
 # --- Settings -----------------------------------------------------
.INCLUDE : settings.mk
diff -r 5fa7b2f73638 solenv/inc/unxmacx.mk
--- a/solenv/inc/unxmacx.mk     Thu Sep 24 12:58:01 2009 +0000
+++ b/solenv/inc/unxmacx.mk     Fri Sep 25 20:47:45 2009 +0200
@@ -52,10 +52,10 @@
 # unless you want to do runtime checks for 10.5 api, you also want to use the 
10.4 sdk
 # (safer/easier than dealing with the MAC_OS_X_VERSION_MAX_ALLOWED macro)
 # http://developer.apple.com/technotes/tn2002/tn2064.html
-MACOSX_DEPLOYMENT_TARGET=10.4
+MACOSX_DEPLOYMENT_TARGET=10.6
 .EXPORT: MACOSX_DEPLOYMENT_TARGET
CDEFS+=-DQUARTZ -EXTRA_CDEFS*=-isysroot /Developer/SDKs/MacOSX10.4u.sdk
+EXTRA_CDEFS*=-isysroot /Developer/SDKs/MacOSX10.6.sdk
 .ENDIF
# Name of library where static data members are initialized
@@ -92,6 +92,11 @@
 objc*=gcc
 objcpp*=g++
+CC += -m32
+CXX += -m32
+objc += -m32
+objcpp += -m32
+
 CFLAGS=-fsigned-char -fmessage-length=0 -malign-natural -c $(EXTRA_CFLAGS)
.IF "$(DISABLE_DEPRECATION_WARNING)" == "TRUE"
@@ -118,7 +123,7 @@
 CFLAGS_NO_EXCEPTIONS=-fno-exceptions
# Normal C++ compilation flags
-CFLAGSCXX=-pipe -malign-natural -fsigned-char -Wno-long-double $(ARCH_FLAGS)
+CFLAGSCXX=-pipe -malign-natural -fsigned-char $(ARCH_FLAGS)
 CFLAGSCXX+= -Wno-ctor-dtor-privacy
PICSWITCH:=-fPIC
@@ -201,7 +206,7 @@
LINKFLAGSDEFS*=-Wl,-multiply_defined,suppress
 # assure backwards-compatibility
-EXTRA_LINKFLAGS*=-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk
+EXTRA_LINKFLAGS*=-Wl,-syslibroot,/Developer/SDKs/MacOSX10.6.sdk
 # Very long install_names are needed so that install_name_tool -change later on
 # does not complain that "larger updated load commands do not fit:"
 LINKFLAGSRUNPATH_URELIB=-install_name 
'@__________________________________________________URELIB/$(@:f)'
diff -r 5fa7b2f73638 soltools/cpp/_unix.c
--- a/soltools/cpp/_unix.c      Thu Sep 24 12:58:01 2009 +0000
+++ b/soltools/cpp/_unix.c      Fri Sep 25 20:47:45 2009 +0200
@@ -190,7 +190,8 @@
 /* memmove is defined here because some vendors don't provide it at
    all and others do a terrible job (like calling malloc) */
-#if !defined(__IBMC__) && !defined(_WIN32) && !defined(__GLIBC__)
+#if !defined(__IBMC__) && !defined(_WIN32) && !defined(__GLIBC__) && \
+    !defined(memmove)
void *
     memmove(void *dp, const void *sp, size_t n)
diff -r 5fa7b2f73638 svtools/bmpmaker/bmp.cxx
--- a/svtools/bmpmaker/bmp.cxx  Thu Sep 24 12:58:01 2009 +0000
+++ b/svtools/bmpmaker/bmp.cxx  Fri Sep 25 20:47:45 2009 +0200
@@ -164,7 +164,7 @@
ByteString aText( rText, RTL_TEXTENCODING_UTF8 );
        aText.Append( "\r\n" );
-       fprintf( stderr, aText.GetBuffer() );
+       fprintf( stderr, "%s", aText.GetBuffer() );
 }
// -----------------------------------------------------------------------------
diff -r 5fa7b2f73638 svtools/bmpmaker/bmpsum.cxx
--- a/svtools/bmpmaker/bmpsum.cxx       Thu Sep 24 12:58:01 2009 +0000
+++ b/svtools/bmpmaker/bmpsum.cxx       Fri Sep 25 20:47:45 2009 +0200
@@ -170,7 +170,7 @@
ByteString aText( rText, RTL_TEXTENCODING_UTF8 );
        aText.Append( "\r\n" );
-       fprintf( stderr, aText.GetBuffer() );
+       fprintf( stderr, "%s", aText.GetBuffer() );
 }
// -----------------------------------------------------------------------------
diff -r 5fa7b2f73638 svtools/bmpmaker/g2g.cxx
--- a/svtools/bmpmaker/g2g.cxx  Thu Sep 24 12:58:01 2009 +0000
+++ b/svtools/bmpmaker/g2g.cxx  Fri Sep 25 20:47:45 2009 +0200
@@ -128,7 +128,7 @@
ByteString aText( rText, RTL_TEXTENCODING_UTF8 );
        aText.Append( "\r\n" );
-       fprintf( stderr, aText.GetBuffer() );
+       fprintf( stderr, "%s", aText.GetBuffer() );
 }
// -----------------------------------------------------------------------------
diff -r 5fa7b2f73638 ucb/source/ucp/webdav/NeonUri.cxx
--- a/ucb/source/ucp/webdav/NeonUri.cxx Thu Sep 24 12:58:01 2009 +0000
+++ b/ucb/source/ucp/webdav/NeonUri.cxx Fri Sep 25 20:47:45 2009 +0200
@@ -58,7 +58,7 @@
                      + __GNUC_MINOR__ * 100 \
                      + __GNUC_PATCHLEVEL__)
 /* Diagnostics pragma was introduced with gcc-4.2.1 */
-#if GCC_VERSION > 40201
+#if GCC_VERSION >= 40201
 #pragma GCC diagnostic ignored "-Wwrite-strings"
 #endif
 #endif
diff -r 5fa7b2f73638 vcl/aqua/source/a11y/aqua11yfocuslistener.hxx
--- a/vcl/aqua/source/a11y/aqua11yfocuslistener.hxx     Thu Sep 24 12:58:01 
2009 +0000
+++ b/vcl/aqua/source/a11y/aqua11yfocuslistener.hxx     Fri Sep 25 20:47:45 
2009 +0200
@@ -47,8 +47,8 @@
static rtl::Reference< AquaA11yFocusListener > theListener; - AquaA11yFocusListener::AquaA11yFocusListener();
-    virtual AquaA11yFocusListener::~AquaA11yFocusListener() {};
+    AquaA11yFocusListener();
+    virtual ~AquaA11yFocusListener() {};
 public:
static rtl::Reference< AquaA11yFocusListener > get();
@@ -63,4 +63,4 @@
     virtual oslInterlockedCount SAL_CALL release() SAL_THROW(());      
 };
-#endif // _AQUA11YFOCUSLISTENER_HXX_
\ No newline at end of file
+#endif // _AQUA11YFOCUSLISTENER_HXX_
diff -r 5fa7b2f73638 vcl/aqua/source/app/vclnsapp.mm
--- a/vcl/aqua/source/app/vclnsapp.mm   Thu Sep 24 12:58:01 2009 +0000
+++ b/vcl/aqua/source/app/vclnsapp.mm   Fri Sep 25 20:47:45 2009 +0200
@@ -82,7 +82,7 @@
                 if( nModMask == NSCommandKeyMask
                     && [[pEvent charactersIgnoringModifiers] isEqualToString: 
@"w"] )
                 {
-                    [pFrame->getWindow() windowShouldClose: nil];
+                    [(SalFrameWindow *) pFrame->getWindow() windowShouldClose: 
nil];
                     return;
                 }
             }
diff -r 5fa7b2f73638 vcl/aqua/source/dtrans/DataFlavorMapping.cxx
--- a/vcl/aqua/source/dtrans/DataFlavorMapping.cxx      Thu Sep 24 12:58:01 
2009 +0000
+++ b/vcl/aqua/source/dtrans/DataFlavorMapping.cxx      Fri Sep 25 20:47:45 
2009 +0200
@@ -87,10 +87,6 @@
        return [NSString stringWithCString: utf8Str.getStr() encoding: 
NSUTF8StringEncoding];
   }
-
-  const NSString* PBTYPE_UT16 = @"CorePasteboardFlavorType 0x75743136";
-  const NSString* PBTYPE_PICT = @"CorePasteboardFlavorType 0x50494354";
-  const NSString* PBTYPE_HTML = @"CorePasteboardFlavorType 0x48544D4C";
   const NSString* PBTYPE_SODX = 
@"application/x-openoffice-objectdescriptor-xml;windows_formatname=\"Star Object 
Descriptor (XML)\"";
   const NSString* PBTYPE_SESX = 
@"application/x-openoffice-embed-source-xml;windows_formatname=\"Star Embed Source 
(XML)\"";
   const NSString* PBTYPE_SLSDX = 
@"application/x-openoffice-linksrcdescriptor-xml;windows_formatname=\"Star Link Source 
Descriptor (XML)\"";
diff -r 5fa7b2f73638 vcl/aqua/source/dtrans/DataFlavorMapping.hxx
--- a/vcl/aqua/source/dtrans/DataFlavorMapping.hxx      Thu Sep 24 12:58:01 
2009 +0000
+++ b/vcl/aqua/source/dtrans/DataFlavorMapping.hxx      Fri Sep 25 20:47:45 
2009 +0200
@@ -125,7 +125,7 @@
/* Returns an NSArray containing all pasteboard types supported by OOo
    */
-  NSArray* DataFlavorMapper::getAllSupportedPboardTypes() const;
+  NSArray* getAllSupportedPboardTypes() const;
private:
   /* Determines if the provided Mime content type is valid.
diff -r 5fa7b2f73638 vcl/aqua/source/dtrans/makefile.mk
--- a/vcl/aqua/source/dtrans/makefile.mk        Thu Sep 24 12:58:01 2009 +0000
+++ b/vcl/aqua/source/dtrans/makefile.mk        Fri Sep 25 20:47:45 2009 +0200
@@ -35,6 +35,9 @@
 TARGET=dtransaqua
 ENABLE_EXCEPTIONS=TRUE
+EXTERNAL_WARNINGS_NOT_ERRORS = TRUE
+    # 'X' is deprecated
+
 # --- Settings -----------------------------------------------------
.INCLUDE : settings.mk
diff -r 5fa7b2f73638 vcl/aqua/source/gdi/makefile.mk
--- a/vcl/aqua/source/gdi/makefile.mk   Thu Sep 24 12:58:01 2009 +0000
+++ b/vcl/aqua/source/gdi/makefile.mk   Fri Sep 25 20:47:45 2009 +0200
@@ -35,6 +35,9 @@
 TARGET=salgdi
 ENABLE_EXCEPTIONS=TRUE
+EXTERNAL_WARNINGS_NOT_ERRORS = TRUE
+    # 'X' is deprecated
+
 .INCLUDE :  $(PRJ)$/util$/makefile.pmk
# --- Settings -----------------------------------------------------
diff -r 5fa7b2f73638 vcl/aqua/source/window/makefile.mk
--- a/vcl/aqua/source/window/makefile.mk        Thu Sep 24 12:58:01 2009 +0000
+++ b/vcl/aqua/source/window/makefile.mk        Fri Sep 25 20:47:45 2009 +0200
@@ -37,6 +37,9 @@
ENABLE_EXCEPTIONS=TRUE +EXTERNAL_WARNINGS_NOT_ERRORS = TRUE
+    # class 'X' does not implement the 'Y' protocol
+
 # --- Settings -----------------------------------------------------
.INCLUDE : settings.mk
diff -r 5fa7b2f73638 vcl/source/fontsubset/cff.cxx
--- a/vcl/source/fontsubset/cff.cxx     Thu Sep 24 12:58:01 2009 +0000
+++ b/vcl/source/fontsubset/cff.cxx     Fri Sep 25 20:47:45 2009 +0200
@@ -2162,7 +2162,7 @@
                return;
// emit the line head
-       mpPtr += sprintf( mpPtr, pLineHead);
+       mpPtr += sprintf( mpPtr, "%s", pLineHead);
        // emit the vector values
        ValVector::value_type aVal = 0;
        for( ValVector::const_iterator it = rVector.begin();;) {
@@ -2174,7 +2174,7 @@
        // emit the last value
        mpPtr += sprintf( mpPtr, "%g", aVal);
        // emit the line tail
-       mpPtr += sprintf( mpPtr, pLineTail);
+       mpPtr += sprintf( mpPtr, "%s", pLineTail);
 }
// --------------------------------------------------------------------
diff -r 5fa7b2f73638 vcl/source/fontsubset/sft.cxx
--- a/vcl/source/fontsubset/sft.cxx     Thu Sep 24 12:58:01 2009 +0000
+++ b/vcl/source/fontsubset/sft.cxx     Fri Sep 25 20:47:45 2009 +0200
@@ -2045,7 +2045,7 @@
     fprintf(outf, h02, modname, modver, modextra);
     fprintf(outf, h09, ttf->psname);
- fprintf(outf, h10);
+    fprintf(outf, "%s", h10);
     fprintf(outf, h11, fname);
 /*    fprintf(outf, h12, 4000000); */
@@ -2060,17 +2060,17 @@
      */
fprintf(outf, h17, rtl_crc32(0, ttf->ptr, ttf->fsize), nGlyphs, rtl_crc32(0, glyphArray, nGlyphs * 2), rtl_crc32(0, encoding, nGlyphs));
-    fprintf(outf, h13);
+    fprintf(outf, "%s", h13);
     fprintf(outf, h14, XUnits(UPEm, GetInt16(table, 36, 1)), XUnits(UPEm, 
GetInt16(table, 38, 1)), XUnits(UPEm, GetInt16(table, 40, 1)), XUnits(UPEm, 
GetInt16(table, 42, 1)));
-    fprintf(outf, h15);
+    fprintf(outf, "%s", h15);
for (i = 0; i < nGlyphs; i++) {
         fprintf(outf, h16, encoding[i], i);
     }
fprintf(outf, h30, nGlyphs+1);
-    fprintf(outf, h31);
-    fprintf(outf, h32);
+    fprintf(outf, "%s", h31);
+    fprintf(outf, "%s", h32);
for (i = 0; i < nGlyphs; i++) {
         fprintf(outf, h33, i);
@@ -2118,14 +2118,14 @@
         }
         if (n > 0) fprintf(outf, "\tfill\n");     /* if glyph is not a 
whitespace character */
- fprintf(outf, h34);
+        fprintf(outf, "%s", h34);
free(pa);
         free(path);
     }
-    fprintf(outf, h35);
+    fprintf(outf, "%s", h35);
- fprintf(outf, h40);
+    fprintf(outf, "%s", h40);
     fprintf(outf, h41, fname);
return SF_OK;
EOF

cd DEV300m60/ooo
./configure --enable-werror --with-use-shell=bash
 # "Your gcc is not -fvisibility=hidden safe. Disabling visibility"
./bootstrap
. MacOSXX86Env.Set.sh
shopt -s expand_aliases
cd smoketestoo_native
build --all -P2 -- -P2

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to