[Libreoffice-commits] .: 13 commits - bridges/source configure.in icc/SampleICC-1.3.2.patch nss/makefile.mk pyuno/source sal/osl solenv/gbuild solenv/inc soltools/adjustvisibility soltools/mkdepend unoil/javamaker

Michael Stahl mst at kemper.freedesktop.org
Fri Mar 16 15:16:01 PDT 2012


 bridges/source/cpp_uno/gcc3_solaris_intel/cpp2uno.cxx |    1 
 bridges/source/cpp_uno/gcc3_solaris_intel/except.cxx  |    1 
 configure.in                                          |   48 -
 icc/SampleICC-1.3.2.patch                             |  678 ------------------
 nss/makefile.mk                                       |    3 
 pyuno/source/module/pyuno.cxx                         |   19 
 sal/osl/unx/process.cxx                               |  204 -----
 solenv/gbuild/JavaClassSet.mk                         |    3 
 solenv/gbuild/gbuild_simple.mk                        |    7 
 solenv/gbuild/platform/solaris.mk                     |  335 ++++----
 solenv/inc/unitools.mk                                |    2 
 solenv/inc/unxsogi.mk                                 |    7 
 solenv/inc/unxsogs.mk                                 |    4 
 soltools/adjustvisibility/adjustvisibility.cxx        |    1 
 soltools/adjustvisibility/makefile.mk                 |    6 
 soltools/mkdepend/makefile.mk                         |    2 
 unoil/javamaker/Makefile                              |    2 
 17 files changed, 277 insertions(+), 1046 deletions(-)

New commits:
commit c94b4b7e0e4aeae13eed9402c1f534e694b4e992
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Mar 16 22:49:29 2012 +0100

    gb_JavaClassSet_add_package_dependency: order only is not enough

diff --git a/solenv/gbuild/JavaClassSet.mk b/solenv/gbuild/JavaClassSet.mk
index d21f649..b2722c1 100644
--- a/solenv/gbuild/JavaClassSet.mk
+++ b/solenv/gbuild/JavaClassSet.mk
@@ -162,7 +162,8 @@ $(foreach external,$(2),$(call gb_JavaClassSet_use_external,$(1),$(external)))
 endef
 
 define gb_JavaClassSet_add_package_dependency
-$(call gb_JavaClassSet_get_preparation_target,$(1)) :| $(call gb_Package_get_target,$(2))
+$(call gb_JavaClassSet_get_preparation_target,$(1)) : \
+	$(call gb_Package_get_target,$(2))
 
 endef
 
commit b183576c5f5d5c7f1eba4c9b09c3e4eb1be69b17
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Mar 16 22:39:09 2012 +0100

    unoil: add missing dependencies in custom makefile

diff --git a/solenv/gbuild/gbuild_simple.mk b/solenv/gbuild/gbuild_simple.mk
index b05cb8c..6ee9e09 100644
--- a/solenv/gbuild/gbuild_simple.mk
+++ b/solenv/gbuild/gbuild_simple.mk
@@ -82,6 +82,13 @@ include $(GBUILDDIR)/Tempfile.mk
 # Include platform/cpu/compiler specific config/definitions
 include $(GBUILDDIR)/platform/$(OS)_$(CPUNAME)_$(COM).mk
 
+ifeq ($(CROSS_COMPILING),YES)
+# We can safely Assume all cross-compilation is from Unix systems.
+gb_Executable_EXT_for_build :=
+else
+gb_Executable_EXT_for_build := $(gb_Executable_EXT)
+endif
+
 ifeq ($(SYSTEM_PYTHON),YES)
 gb_PYTHONTARGET :=
 gb_PYTHON := $(PYTHON)
diff --git a/unoil/javamaker/Makefile b/unoil/javamaker/Makefile
index 1086c10..f239156 100644
--- a/unoil/javamaker/Makefile
+++ b/unoil/javamaker/Makefile
@@ -28,7 +28,7 @@
 gb_PARTIALBUILD := T
 include $(GBUILDDIR)/gbuild_simple.mk
 
-done :
+done : $(OUTDIR)/bin/offapi.rdb $(OUTDIR)/bin/udkapi.rdb $(OUTDIR_FOR_BUILD)/bin/javamaker$(gb_Executable_EXT_for_build)
 	$(call gb_Helper_abbreviate_dirs_native, \
 	$(call gb_Helper_execute,javamaker -BUCR -O. $(OUTDIR)/bin/offapi.rdb -X$(OUTDIR)/bin/udkapi.rdb) && \
 	touch $@)
commit 742dca7366ba6ac3c58b1df6ee548788f4ce24e7
Author: David Bolen <db3l.net at gmail.com>
Date:   Fri Mar 16 22:10:24 2012 +0100

    fdo#46926: PyUNO_cmp: return acquired reference

diff --git a/pyuno/source/module/pyuno.cxx b/pyuno/source/module/pyuno.cxx
index d51ad3b..827c0a3 100644
--- a/pyuno/source/module/pyuno.cxx
+++ b/pyuno/source/module/pyuno.cxx
@@ -595,6 +595,8 @@ int PyUNO_setattr (PyObject* self, char* name, PyObject* value)
 // ensure object identity and struct equality
 static PyObject* PyUNO_cmp( PyObject *self, PyObject *that, int op )
 {
+    PyObject *result;
+
     if(op != Py_EQ && op != Py_NE)
     {
         PyErr_SetString(PyExc_TypeError, "only '==' and '!=' comparisions are defined");
@@ -602,7 +604,9 @@ static PyObject* PyUNO_cmp( PyObject *self, PyObject *that, int op )
     }
     if( self == that )
     {
-        return (op == Py_EQ ? Py_True : Py_False);
+        result = (op == Py_EQ ? Py_True : Py_False);
+        Py_INCREF(result);
+        return result;
     }
     try
     {
@@ -624,14 +628,18 @@ static PyObject* PyUNO_cmp( PyObject *self, PyObject *that, int op )
                     Reference< XMaterialHolder > xOther( other->members->xInvocation,UNO_QUERY );
                     if( xMe->getMaterial() == xOther->getMaterial() )
                     {
-                        return (op == Py_EQ ? Py_True : Py_False);
+                        result = (op == Py_EQ ? Py_True : Py_False);
+                        Py_INCREF(result);
+                        return result;
                     }
                 }
                 else if( tcMe == com::sun::star::uno::TypeClass_INTERFACE )
                 {
                     if( me->members->wrappedObject == other->members->wrappedObject )
                     {
-                        return (op == Py_EQ ? Py_True : Py_False);
+                        result = (op == Py_EQ ? Py_True : Py_False);
+                        Py_INCREF(result);
+                        return result;
                     }
                 }
             }
@@ -641,7 +649,10 @@ static PyObject* PyUNO_cmp( PyObject *self, PyObject *that, int op )
     {
         raisePyExceptionWithAny( makeAny( e ) );
     }
-    return (op == Py_EQ ? Py_False : Py_True);
+
+    result = (op == Py_EQ ? Py_False : Py_True);
+    Py_INCREF(result);
+    return result;
 }
 
 /* Python 2 has a tp_flags value for rich comparisons.  Python 3 does not (on by default) */
commit 3c4cd1deaf71d0d800957b3580d426c721bf7844
Author: Jonathan Adams <t12nslookup at gmail.com>
Date:   Fri Mar 16 21:50:37 2012 +0100

    gbuild: switch solaris.mk to GCC

diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk
index 13c3435..3e10ca7 100644
--- a/solenv/gbuild/platform/solaris.mk
+++ b/solenv/gbuild/platform/solaris.mk
@@ -26,23 +26,17 @@
 #
 #*************************************************************************
 
-# FIXME: this is currently hardcoded to SunStudio.
-# We really don't want to support building with that because of all its
-# bugs that need painful work-arounds; if somebody revives the Solaris
-# port then please make it use GCC instead (there used to be a Solaris/GCC
-# port at some point in the past, see solenv/inc/unxsog{i,s}.mk).
-
 GUI := UNX
-COM := C52
+
+gb_Executable_EXT:=
+
+include $(GBUILDDIR)/platform/com_GCC_defs.mk
 
 gb_MKTEMP := mktemp -t gbuild.XXXXXX
 
-gb_CC := cc
-gb_CXX := CC
-gb_GCCP := cc
-gb_AR := ar
-gb_AWK := /usr/xpg4/bin/awk
-gb_CLASSPATHSEP := :
+ifneq ($(origin AR),default)
+gb_AR := $(AR)
+endif
 
 # use CC/CXX if they are nondefaults
 ifneq ($(origin CC),default)
@@ -53,9 +47,12 @@ ifneq ($(origin CXX),default)
 gb_CXX := $(CXX)
 endif
 
+ifeq ($(CPUNAME),SPARC)
+gb_CPUDEFS := -D__sparcv8plus
+endif
+
 gb_OSDEFS := \
 	-D$(OS) \
-	-D$(GUI) \
 	-DSYSV \
 	-DSUN \
 	-DSUN4 \
@@ -63,142 +60,158 @@ gb_OSDEFS := \
 	-D_POSIX_PTHREAD_SEMANTICS \
 	-D_PTHREADS \
 	-DUNIX \
+	-DUNX \
+	$(PTHREAD_CFLAGS) \
 
-gb_COMPILERDEFS := \
-	-D$(COM) \
-	-DCPPU_ENV=sunpro5 \
-
-ifeq ($(CPUNAME),SPARC)
-gb_CPUDEFS := -D__sparcv8plus
+ifeq ($(GXX_INCLUDE_PATH),)
+GXX_INCLUDE_PATH=$(COMPATH)/include/c++/$(shell gcc -dumpversion)
 endif
 
 gb_CFLAGS := \
-	-temp=/tmp \
-	-KPIC \
-	-mt \
-	-xldscope=hidden \
-	-xCC \
-	-xc99=none \
+	$(gb_CFLAGS_COMMON) \
+	-fPIC \
+	-Wdeclaration-after-statement \
+	-Wshadow \
 
 gb_CXXFLAGS := \
-	-temp=/tmp \
-	-KPIC \
-	-mt \
-	-xldscope=hidden \
-	-features=no%altspell \
-	-library=no%Cstd \
-	+w2 \
-	-erroff=doubunder,identexpected,inllargeuse,inllargeint,notemsource,reftotemp,truncwarn,wnoretvalue,anonnotype \
+	$(gb_CXXFLAGS_COMMON) \
+	-fPIC \
+	-Wshadow \
+	-Wsign-promo \
+	-Woverloaded-virtual \
+	-Wno-non-virtual-dtor \
+
+ifeq ($(HAVE_GCC_VISIBILITY_FEATURE),TRUE)
+gb_COMPILERDEFS += \
+        -DHAVE_GCC_VISIBILITY_FEATURE \
+
+gb_CFLAGS += \
+        -fvisibility=hidden
+
+gb_CXXFLAGS += \
+	-fvisibility=hidden \
+
+ifneq ($(HAVE_GCC_VISIBILITY_BROKEN),TRUE)
+gb_CXXFLAGS += \
+        -fvisibility-inlines-hidden \
 
-ifeq ($(gb_SYMBOL),$(true))
-gb_CFLAGS += -g -xs
-gb_CXXFLAGS += -g0 -xs
 endif
 
-ifneq ($(EXTERNAL_WARNINGS_NOT_ERRORS),TRUE)
-gb_CFLAGS_WERROR := -errwarn=%all
-gb_CXXFLAGS_WERROR := -xwe
 endif
 
-gb_LinkTarget_EXCEPTIONFLAGS := \
-	-DEXCEPTIONS_ON \
+# enable debug STL
+ifeq ($(gb_PRODUCT),$(false))
+gb_COMPILERDEFS += \
+	-D_GLIBCXX_DEBUG \
 
-gb_LinkTarget_NOEXCEPTIONFLAGS := \
-	-DEXCEPTIONS_OFF \
-	-noex \
+endif
 
-gb_LinkTarget_LDFLAGS := \
-	$(subst -L../lib , ,$(SOLARLIB)) \
-	-temp=/tmp \
-	-w \
-	-mt \
-	-Bdirect \
-	-z defs \
-	-z combreloc \
-	-norunpath \
-	-PIC \
-	-library=no%Cstd \
-
-
-gb_DEBUG_CFLAGS := -g
-ifneq ($(gb_DEBUGLEVEL),0)
-gb_COMPILEROPTFLAGS :=
-else
-ifeq ($(CPUNAME),INTEL)
-gb_COMPILEROPTFLAGS := -xarch=generic -xO3
-else # ifeq ($(CPUNAME),SPARC)
-#  -m32 -xarch=sparc		restrict target to 32 bit sparc
-#  -xO3					 optimization level 3
-#  -xspace				  don't do optimizations which do increase binary size
-#  -xprefetch=yes		   do prefetching (helps on UltraSparc III)
-gb_COMPILEROPTFLAGS := -m32 -xarch=sparc -xO3 -xspace -xprefetch=yes
+gb_CCVER := $(shell $(gb_CC) -dumpversion | $(gb_AWK) -F. -- '{ print $$1*10000+$$2*100+$$3 }')
+gb_GccLess460 := $(shell expr $(gb_CCVER) \< 40600)
+
+#At least SLED 10.2 gcc 4.3 overly agressively optimizes uno::Sequence into
+#junk, so only strict-alias on >= 4.6.0
+gb_StrictAliasingUnsafe := $(gb_GccLess460)
+
+ifeq ($(gb_StrictAliasingUnsafe),1)
+gb_CFLAGS += -fno-strict-aliasing
+gb_CXXFLAGS += -fno-strict-aliasing
+endif
+
+ifeq ($(HAVE_CXX0X),TRUE)
+#Currently, as well as for its own merits, c++11/c++0x mode allows use to use
+#a template for SAL_N_ELEMENTS to detect at compiler time its misuse
+gb_CXXFLAGS += -std=c++0x
+
+#We have so many std::auto_ptr uses that we need to be able to disable
+#warnings for those so that -Werror continues to be useful, seeing as moving
+#to unique_ptr isn't an option when we must support different compilers
+
+#When we are using 4.6.0 we can use gcc pragmas to selectively silence auto_ptr
+#warnings in isolation, but for <= 4.5.X we need to globally disable
+#deprecation
+ifeq ($(gb_GccLess460),1)
+gb_CXXFLAGS += -Wno-deprecated-declarations
 endif
 endif
 
-gb_COMPILERNOOPTFLAGS :=
+ifeq ($(ENABLE_LTO),TRUE)
+gb_LinkTarget_LDFLAGS += -fuse-linker-plugin $(gb_COMPILERDEFAULTOPTFLAGS)
+endif
 
-# Helper class
+ifneq ($(strip $(SYSBASE)),)
+gb_CXXFLAGS += --sysroot=$(SYSBASE)
+gb_CFLAGS += --sysroot=$(SYSBASE)
+gb_LinkTarget_LDFLAGS += \
+	-Wl,--sysroot=$(SYSBASE)
+endif
 
-gb_Helper_set_ld_path := LD_LIBRARY_PATH=$(OUTDIR_FOR_BUILD)/lib
+#JAD#	-Wl,-rpath-link,$(SYSBASE)/lib:$(SYSBASE)/usr/lib \
+gb_LinkTarget_LDFLAGS += \
+	-L$(SYSBASE)/lib \
+	-L$(SYSBASE)/usr/lib \
+	-Wl,-z,combreloc \
+	$(subst -L../lib , ,$(SOLARLIB)) \
 
-# $(1): list of directory pathnames to append at the end of the ld path
-define gb_Helper_extend_ld_path
-$(gb_Helper_set_ld_path)$(foreach dir,$(1),:$(dir))
-endef
+ifeq ($(HAVE_LD_HASH_STYLE),TRUE)
+gb_LinkTarget_LDFLAGS += \
+	-Wl,--hash-style=$(WITH_LINKER_HASH_STYLE) \
 
-# convert parameters filesystem root to native notation
-# does some real work only on windows, make sure not to
-# break the dummy implementations on unx*
-define gb_Helper_convert_native
-$(1)
-endef
+endif
 
 # Convert path to native notation
 define gb_Helper_native_path
 $(1)
 endef
 
-gb_Helper_OUTDIRLIBDIR := $(OUTDIR)/lib
+ifneq ($(HAVE_LD_BSYMBOLIC_FUNCTIONS),)
+gb_LinkTarget_LDFLAGS += \
+	-Wl,--dynamic-list-cpp-new \
+	-Wl,--dynamic-list-cpp-typeinfo \
+	-Wl,-Bsymbolic-functions \
 
-# CObject class
+endif
 
-define gb_CObject__command
-$(call gb_Output_announce,$(2).c,$(true),C  ,3)
-$(call gb_Helper_abbreviate_dirs,\
-	rm -f $(4) && \
-	mkdir -p $(dir $(1)) $(dir $(4)) && \
-	$(gb_CC) \
-		-c $(3) \
-		-o $(1) \
-		-xMMD \
-		-xMF $(4) \
-		$(DEFS) \
-		$(T_CFLAGS) \
-		$(if $(WARNINGS_NOT_ERRORS),,$(gb_CFLAGS_WERROR)) \
-		-I$(dir $(3)) \
-		$(INCLUDE))
-endef
+ifneq ($(gb_SYMBOL),$(true))
+ifeq ($(gb_STRIP),$(true))
+gb_LinkTarget_LDFLAGS += -Wl,--strip-all
+endif
+endif
+
+ifneq ($(gb_DEBUGLEVEL),0)
+gb_COMPILEROPTFLAGS := -O0
+gb_LINKEROPTFLAGS :=
+else
+gb_COMPILEROPTFLAGS := $(gb_COMPILERDEFAULTOPTFLAGS)
+gb_LINKEROPTFLAGS := -Wl,-O1
+endif
 
+gb_DEBUG_CFLAGS := -ggdb3 -finline-limit=0 -fno-inline -fno-default-inline
 
-# CxxObject class
+gb_COMPILERNOOPTFLAGS := -O0
 
-define gb_CxxObject__command
-$(call gb_Output_announce,$(2).cxx,$(true),CXX,3)
+# AsmObject class
+
+gb_AsmObject_get_source = $(1)/$(2).s
+
+# $(call gb_AsmObject__command,object,relative-source,source,dep-file)
+define gb_AsmObject__command
+$(call gb_Output_announce,$(2),$(true),ASM,3)
 $(call gb_Helper_abbreviate_dirs,\
 	mkdir -p $(dir $(1)) $(dir $(4)) && \
-	$(gb_CXX) \
+	$(gb_CC) \
 		$(DEFS) \
-		$(T_CXXFLAGS) \
-		$(if $(WARNINGS_NOT_ERRORS),,$(gb_CXXFLAGS_WERROR)) \
+		$(T_CFLAGS) \
+		$(if $(WARNINGS_NOT_ERRORS),,$(gb_CFLAGS_WERROR)) \
 		-c $(3) \
 		-o $(1) \
-		-xMMD \
-		-xMF $(4) \
+		-MMD -MT $(1) \
+		-MP -MF $(4) \
 		-I$(dir $(3)) \
-		$(INCLUDE_STL) $(INCLUDE))
+		$(INCLUDE)) && \
+	echo "$(1) : $(3)" > $(4)
 endef
 
-
 # LinkTarget class
 
 define gb_LinkTarget__get_rpath_for_layer
@@ -212,31 +225,34 @@ gb_LinkTarget__RPATHS := \
 	SDKBIN:\dORIGIN/../../ure-link/lib \
 	NONE:\dORIGIN/../lib:\dORIGIN \
 
-gb_LinkTarget_CFLAGS := $(gb_CFLAGS)
-gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS)
-
+gb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_CFLAGS_WERROR)
+gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) $(gb_CXXFLAGS_WERROR)
 
-gb_LinkTarget_INCLUDE := $(filter-out %/stl, $(subst -I. , ,$(SOLARINC)))
-gb_LinkTarget_INCLUDE_STL := $(filter %/stl, $(subst -I. , ,$(SOLARINC)))
+ifeq ($(gb_SYMBOL),$(true))
+gb_LinkTarget_CXXFLAGS += -ggdb2
+gb_LinkTarget_CFLAGS += -ggdb2
+endif
 
+# note that `cat $(extraobjectlist)` is needed to build with older gcc versions, e.g. 4.1.2 on SLED10
+# we want to use @$(extraobjectlist) in the long run
 define gb_LinkTarget__command_dynamiclink
 $(call gb_Helper_abbreviate_dirs,\
 	mkdir -p $(dir $(1)) && \
 	$(gb_CXX) \
 		$(if $(filter Library CppunitTest,$(TARGETTYPE)),$(gb_Library_TARGETTYPEFLAGS)) \
-		$(if $(SOVERSIONSCRIPT),-M $(SOVERSIONSCRIPT)) \
+		$(if $(filter Library,$(TARGETTYPE)),$(gb_Library_LTOFLAGS)) \
 		$(subst \d,$$,$(RPATH)) \
 		$(T_LDFLAGS) \
-		$(patsubst lib%.so,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_filename,$(lib)))) \
 		$(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \
 		$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
+		$(foreach object,$(ASMOBJECTS),$(call gb_AsmObject_get_target,$(object))) \
 		$(foreach object,$(GENCOBJECTS),$(call gb_GenCObject_get_target,$(object))) \
 		$(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \
-		$(foreach extraobjectlist,$(EXTRAOBJECTLISTS),@$(extraobjectlist)) \
-		$(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) \
-		$(LIBS) \
-		-o $(if $(SOVERSION),$(1).$(SOVERSION),$(1)))
-	$(if $(SOVERSION),ln -sf $(notdir $(1)).$(SOVERSION) $(1))
+		$(foreach extraobjectlist,$(EXTRAOBJECTLISTS),`cat $(extraobjectlist)`) \
+		-Wl$(COMMA)--start-group $(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) -Wl$(COMMA)--end-group \
+		$(LIBS) -lnsl -lsocket \
+		$(patsubst lib%.a,-l%,$(patsubst lib%.so,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_filename,$(lib))))) \
+		-o $(1))
 endef
 
 define gb_LinkTarget__command_staticlink
@@ -245,8 +261,10 @@ $(call gb_Helper_abbreviate_dirs,\
 	$(gb_AR) -rsu $(1) \
 		$(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \
 		$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
+		$(foreach object,$(ASMOBJECTS),$(call gb_AsmObject_get_target,$(object))) \
 		$(foreach object,$(GENCOBJECTS),$(call gb_GenCObject_get_target,$(object))) \
 		$(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \
+		$(foreach extraobjectlist,$(EXTRAOBJECTLISTS),@$(extraobjectlist)) \
 		$(if $(findstring s,$(MAKEFLAGS)),2> /dev/null))
 endef
 
@@ -256,40 +274,34 @@ $(if $(filter Library CppunitTest Executable,$(TARGETTYPE)),$(call gb_LinkTarget
 $(if $(filter StaticLibrary,$(TARGETTYPE)),$(call gb_LinkTarget__command_staticlink,$(1)))
 endef
 
+
 # Library class
 
 gb_Library_DEFS :=
-gb_Library_TARGETTYPEFLAGS := -Bdynamic -z text -G
+gb_Library_TARGETTYPEFLAGS := -shared
 gb_Library_SYSPRE := lib
 gb_Library_UNOVERPRE := $(gb_Library_SYSPRE)uno_
 gb_Library_PLAINEXT := .so
 gb_Library_DLLEXT := .so
-gb_Library_RTEXT := C52$(gb_Library_PLAINEXT)
+gb_Library_RTEXT := gcc3$(gb_Library_PLAINEXT)
 
 gb_Library_OOOEXT := $(gb_Library_DLLPOSTFIX)$(gb_Library_PLAINEXT)
 gb_Library_UNOEXT := .uno$(gb_Library_PLAINEXT)
 
-gb_STDLIBS := \
-	Crun \
-	m \
-	c \
-
 gb_Library_PLAINLIBS_NONE += \
-	$(gb_STDLIBS) \
 	dl \
 	fontconfig \
 	freetype \
 	GL \
 	GLU \
-	jpeg \
+	ICE \
 	m \
-	nsl \
 	pthread \
-	socket \
-	X11 \
-	Xext \
 	SM \
 	ICE \
+	X11 \
+	Xext \
+	Xrender \
 
 gb_Library_FILENAMES := \
 	$(foreach lib,$(gb_Library_OOOLIBS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_OOOEXT)) \
@@ -314,7 +326,9 @@ gb_Library_LAYER := \
 	$(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):URELIB) \
 
 define gb_Library_get_rpath
-'-R$(call gb_LinkTarget__get_rpath_for_layer,$(call gb_Library_get_layer,$(1)))'
+'-Wl,-rpath,$(call gb_LinkTarget__get_rpath_for_layer,$(call gb_Library_get_layer,$(1)))' \
+'-L$(gb_Library_OUTDIRLOCATION)'
+#JAD#'-Wl,-rpath-link,$(gb_Library_OUTDIRLOCATION)'
 endef
 
 define gb_Library_Library_platform
@@ -349,7 +363,9 @@ gb_Executable_LAYER := \
 
 
 define gb_Executable_get_rpath
-'-R$(call gb_LinkTarget__get_rpath_for_layer,$(call gb_Executable_get_layer,$(1)))'
+'-Wl,-rpath,$(call gb_LinkTarget__get_rpath_for_layer,$(call gb_Executable_get_layer,$(1)))' \
+-L$(gb_Library_OUTDIRLOCATION)
+#JAD#-Wl,-rpath-link,$(gb_Library_OUTDIRLOCATION)
 endef
 
 define gb_Executable_Executable_platform
@@ -375,33 +391,42 @@ endef
 
 # JunitTest class
 
+ifneq ($(OOO_TEST_SOFFICE),)
+gb_JunitTest_SOFFICEARG:=$(OOO_TEST_SOFFICE)
+else
+ifneq ($(gb_JunitTest_DEBUGRUN),)
+gb_JunitTest_SOFFICEARG:=connect:pipe,name=$(USER)
+else
+gb_JunitTest_SOFFICEARG:=path:$(OUTDIR)/installation/opt/program/soffice
+endif
+endif
+
 define gb_JunitTest_JunitTest_platform
 $(call gb_JunitTest_get_target,$(1)) : DEFS := \
-	-Dorg.openoffice.test.arg.soffice="$$$${OOO_TEST_SOFFICE:-path:$(OUTDIR)/installation/opt/program/soffice}" \
-	-Dorg.openoffice.test.arg.env=LD_LIBRARY_PATH \
+	-Dorg.openoffice.test.arg.env=$(gb_Helper_LIBRARY_PATH_VAR) \
 	-Dorg.openoffice.test.arg.user=file://$(call gb_JunitTest_get_userdir,$(1)) \
 	-Dorg.openoffice.test.arg.workdir=$(call gb_JunitTest_get_userdir,$(1)) \
+	-Dorg.openoffice.test.arg.postprocesscommand=$(GBUILDDIR)/platform/unxgcc_gdbforjunit.sh \
+	-Dorg.openoffice.test.arg.soffice="$(gb_JunitTest_SOFFICEARG)" \
 
 endef
 
-# Sun cc/CC support -xM1/-xMF flags, but unfortunately refuse input files that
-# do not have the right suffix, so use makedepend here...
-define gb_SrsPartTarget__command_dep
-$(call gb_Helper_abbreviate_dirs,\
-	$(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
-		$(INCLUDE) \
-		$(DEFS) \
-		$(2) \
-		-f - \
-	| $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
-		-v OBJECTFILE=$(call gb_SrsPartTarget_get_target,$(1)) \
-		-v OUTDIR=$(OUTDIR)/ \
-		-v WORKDIR=$(WORKDIR)/ \
-		-v SRCDIR=$(SRCDIR)/ \
-	> $(call gb_SrsPartTarget_get_dep_target,$(1)))
+# Module class
+
+define gb_Module_DEBUGRUNCOMMAND
+OFFICESCRIPT=`mktemp` && \
+printf ". $(OUTDIR)/installation/opt/program/ooenv\\n" > $${OFFICESCRIPT} && \
+printf "gdb --tui $(OUTDIR)/installation/opt/program/soffice.bin" >> $${OFFICESCRIPT} && \
+printf " -ex \"set args --norestore --nologo '--accept=pipe,name=$(USER);urp;' -env:UserInstallation=file://$(OUTDIR)/installation/\"" >> $${OFFICESCRIPT} && \
+printf " -ex \"r\"\\n" >> $${OFFICESCRIPT} && \
+$(SHELL) $${OFFICESCRIPT} && \
+rm $${OFFICESCRIPT}
 endef
 
+
 # Python
 gb_PYTHON_PRECOMMAND := $(gb_Helper_set_ld_path) PYTHONHOME=$(OUTDIR)/lib/python PYTHONPATH=$(OUTDIR)/lib/python:$(OUTDIR)/lib/python/lib-dynload
 
+include $(GBUILDDIR)/platform/com_GCC_class.mk
+
 # vim: set noet sw=4:
commit 9d79147fc7dd9984873aed92b8a718e64e726ca2
Author: Jonathan Adams <t12nslookup at gmail.com>
Date:   Fri Mar 16 21:50:37 2012 +0100

    unitools.mk: do not override $GNUMAKE from configure

diff --git a/solenv/inc/unitools.mk b/solenv/inc/unitools.mk
index 4de797c..863c4ad 100644
--- a/solenv/inc/unitools.mk
+++ b/solenv/inc/unitools.mk
@@ -129,7 +129,7 @@ AWK*=nawk
 GNUCOPY*=/usr/gnu/bin/cp
 GNUPATCH*=/usr/gnu/bin/patch
 GNUTAR*=/usr/sfw/bin/gtar
-GNUMAKE=/usr/sfw/bin/make
+GNUMAKE*=gmake
 DEREFERENCE=
 .ELIF "$(OS)"=="AIX"
 AWK*=/opt/freeware/bin/awk
commit 1ffb10015d971d66239691123937cd7aedc0990f
Author: Jonathan Adams <t12nslookup at gmail.com>
Date:   Fri Mar 16 21:50:37 2012 +0100

    adapt unxsog{i,s}.mk to Solaris ld

diff --git a/solenv/inc/unxsogi.mk b/solenv/inc/unxsogi.mk
index 4e81165..49ca1f3 100644
--- a/solenv/inc/unxsogi.mk
+++ b/solenv/inc/unxsogi.mk
@@ -78,16 +78,17 @@ LINK*=$(CXX)
 LINKC*=$(CC)
 
 LINKFLAGS=
-LINKFLAGSAPPGUI=-Wl,-export-dynamic
+#LINKFLAGSAPPGUI=-Wl,-export-dynamic
 LINKFLAGSSHLGUI=-shared
-LINKFLAGSAPPCUI=-Wl,-export-dynamic
+#LINKFLAGSAPPCUI=-Wl,-export-dynamic
 LINKFLAGSSHLCUI=-shared
 LINKFLAGSTACK=
 LINKFLAGSPROF=
 LINKFLAGSDEBUG=-g
 LINKFLAGSOPT=
 
-LINKVERSIONMAPFLAG=-Wl,--version-script
+#LINKVERSIONMAPFLAG=-Wl,--version-script
+LINKVERSIONMAPFLAG=-Wl,-M
 
 # enable visibility define in "sal/types.h"
 .IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
diff --git a/solenv/inc/unxsogs.mk b/solenv/inc/unxsogs.mk
index e25d690..6a17f59 100644
--- a/solenv/inc/unxsogs.mk
+++ b/solenv/inc/unxsogs.mk
@@ -77,9 +77,9 @@ LINK*=$(CXX)
 LINKC*=$(CC)
 
 LINKFLAGS=
-LINKFLAGSAPPGUI=-Wl,-export-dynamic
+#LINKFLAGSAPPGUI=-Wl,-export-dynamic
 LINKFLAGSSHLGUI=-shared
-LINKFLAGSAPPCUI=-Wl,-export-dynamic
+#LINKFLAGSAPPCUI=-Wl,-export-dynamic
 LINKFLAGSSHLCUI=-shared
 LINKFLAGSTACK=
 LINKFLAGSPROF=
commit 3ecb3f88780270e82a7d49fe22a59eca87512b00
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Mar 16 21:50:36 2012 +0100

    soltools: fix solaris/gcc build

diff --git a/soltools/adjustvisibility/makefile.mk b/soltools/adjustvisibility/makefile.mk
index ea0d09c..ad37531 100644
--- a/soltools/adjustvisibility/makefile.mk
+++ b/soltools/adjustvisibility/makefile.mk
@@ -40,8 +40,8 @@ noadjust=TRUE
 
 # --- Files --------------------------------------------------------
 
-# This tool is for Solaris only
-.IF "$(OS)"=="SOLARIS"
+# This tool is for SunStudio on Solaris only
+.IF "$(OS)$(COM)"=="SOLARISC52"
 
 APP1TARGET	= 	adjustvisibility
 APP1OBJS	=	$(OBJ)$/adjustvisibility.obj
@@ -52,7 +52,7 @@ APP1RPATH   =   NONE
 #APP1STDLIBS+=-lstlport
 APP1STDLIBS+=-lCstd
 
-.ENDIF "$(OS)"=="SOLARIS"
+.ENDIF "$(OS)$(COM)"=="SOLARISC52"
 
 # --- Targets ------------------------------------------------------
 
diff --git a/soltools/mkdepend/makefile.mk b/soltools/mkdepend/makefile.mk
index da2a3d1..4368acb 100644
--- a/soltools/mkdepend/makefile.mk
+++ b/soltools/mkdepend/makefile.mk
@@ -76,7 +76,7 @@ APP1RPATH=NONE
 APP1STDLIBS+=msvcprt.lib
 .ENDIF                        # "$(COM)"=="MSC"
 
-.IF "$(OS)"=="SOLARIS"
+.IF "$(OS)$(COM)"=="SOLARISC52"
 #APP1STDLIBS+=-lstlport
 APP1STDLIBS+=-lCstd
 .ENDIF
commit 00eebf6403690fa1d90ca4e51835715d9f251504
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Mar 16 21:50:24 2012 +0100

    sal: fix warnings

diff --git a/sal/osl/unx/process.cxx b/sal/osl/unx/process.cxx
index c5a608b..ff68fde 100644
--- a/sal/osl/unx/process.cxx
+++ b/sal/osl/unx/process.cxx
@@ -218,7 +218,7 @@ oslProcessError SAL_CALL osl_searchPath_impl(const sal_Char* pszName, const sal_
  osl_sendResourcePipe
  *********************************************/
 
-sal_Bool osl_sendResourcePipe(oslPipe pPipe, oslSocket pSocket)
+sal_Bool osl_sendResourcePipe(oslPipe /*pPipe*/, oslSocket /*pSocket*/)
 {
     return osl_Process_E_InvalidError;
 }
@@ -227,7 +227,7 @@ sal_Bool osl_sendResourcePipe(oslPipe pPipe, oslSocket pSocket)
  osl_receiveResourcePipe
  *********************************************/
 
-oslSocket osl_receiveResourcePipe(oslPipe pPipe)
+oslSocket osl_receiveResourcePipe(oslPipe /*pPipe*/)
 {
     oslSocket pSocket = 0;
     return pSocket;
commit 7b37265b8e1afe480a6bbd271bf48fa1cbb44d55
Author: Jonathan Adams <t12nslookup at gmail.com>
Date:   Fri Mar 16 20:52:26 2012 +0100

    sal: remove unx implementation of osl_sendResourcePipe/osl_receiveResourcePipe
    
    These are deprecated and not used in LO.

diff --git a/sal/osl/unx/process.cxx b/sal/osl/unx/process.cxx
index cfaecde..c5a608b 100644
--- a/sal/osl/unx/process.cxx
+++ b/sal/osl/unx/process.cxx
@@ -215,198 +215,12 @@ oslProcessError SAL_CALL osl_searchPath_impl(const sal_Char* pszName, const sal_
 
 
 /**********************************************
- sendFdPipe
- *********************************************/
-
-static sal_Bool sendFdPipe(int PipeFD, int SocketFD)
-{
-    sal_Bool bRet = sal_False;
-
-    struct iovec    iov[1];
-    struct msghdr   msg;
-    char            buf[2]; /* send_fd()/recv_fd() 2-byte protocol */
-    int nSend;
-    int RetCode=0;
-
-#if defined(IOCHANNEL_TRANSFER_BSD)
-
-    OSL_TRACE("IOCHANNEL_TRANSFER_BSD send");
-/*      OSL_TRACE("sending fd %i\n",SocketFD); */
-
-    iov[0].iov_base = buf;
-    iov[0].iov_len  = sizeof(buf);
-    msg.msg_iov     = iov;
-    msg.msg_iovlen  = 1;
-    msg.msg_name    = NULL;
-    msg.msg_namelen = 0;
-
-    msg.msg_accrights    = (caddr_t) &SocketFD; /* addr of descriptor */
-    msg.msg_accrightslen = sizeof(int);     /* pass 1 descriptor */
-    buf[1] = 0;                             /* zero status means OK */
-    buf[0] = 0;                             /* null byte flag to recv_fd() */
-
-#else
-
-    struct cmsghdr* cmptr = (struct cmsghdr*)malloc(CONTROLLEN);
-
-    OSL_TRACE("!!!!!! IOCHANNEL_TRANSFER_BSD_RENO send");
-/*      OSL_TRACE("sending fd %i\n",SocketFD); */
-
-    iov[0].iov_base = buf;
-    iov[0].iov_len = sizeof(buf);
-    msg.msg_iov = iov;
-    msg.msg_iovlen = 1;
-    msg.msg_name = NULL;
-    msg.msg_namelen = 0;
-    msg.msg_control = (caddr_t) cmptr;
-    msg.msg_controllen = CONTROLLEN;
-
-    cmptr->cmsg_level = SOL_SOCKET;
-    cmptr->cmsg_type = SCM_RIGHTS;
-    cmptr->cmsg_len = CONTROLLEN;
-    memcpy(CMSG_DATA(cmptr), &SocketFD, sizeof(int));
-
-#endif
-
-    if ( ( nSend = sendmsg(PipeFD, &msg, 0) ) > 0 )
-    {
-        bRet = sal_True;
-        OSL_TRACE("sendFdPipe : send '%i' bytes",nSend);
-
-    }
-    else
-    {
-        OSL_TRACE("sendFdPipe : sending failed (%s)",strerror(errno));
-    }
-
-    bRet = safeRead(PipeFD, &RetCode, sizeof(RetCode));
-
-    if ( bRet && RetCode == 1 )
-    {
-        OSL_TRACE("sendFdPipe : resource was received");
-    }
-    else
-    {
-        OSL_TRACE("sendFdPipe : resource wasn't received (error %s)", strerror(errno));
-    }
-
-#if defined(IOCHANNEL_TRANSFER_BSD_RENO)
-    free(cmptr);
-#endif
-
-    return bRet;
-}
-
-/**********************************************
- receiveFdPipe
- *********************************************/
-
-static oslSocket receiveFdPipe(int PipeFD)
-{
-    oslSocket pSocket = 0;
-    struct msghdr msghdr;
-    struct iovec iov[1];
-    char buffer[2];
-    sal_Int32 nRead;
-    int newfd=-1;
-    int nRetCode=0;
-/*      char *ptr; */
-
-#if defined(IOCHANNEL_TRANSFER_BSD)
-
-    OSL_TRACE("IOCHANNEL_TRANSFER_BSD receive");
-
-    iov[0].iov_base = buffer;
-    iov[0].iov_len = sizeof(buffer);
-    msghdr.msg_name = NULL;
-    msghdr.msg_namelen = 0;
-    msghdr.msg_iov = iov;
-    msghdr.msg_iovlen = 1;
-    msghdr.msg_accrights = (caddr_t) &newfd; /* addr of descriptor   */
-    msghdr.msg_accrightslen = sizeof(int);   /* receive 1 descriptor */
-
-#else
-    struct cmsghdr* cmptr = (struct cmsghdr*)malloc(CONTROLLEN);
-
-    OSL_TRACE(" !!!! IOCHANNEL_TRANSFER_BSD_RENO receive");
-
-    iov[0].iov_base = buffer;
-    iov[0].iov_len = sizeof(buffer);
-    msghdr.msg_name = NULL;
-    msghdr.msg_namelen = 0;
-    msghdr.msg_iov = iov;
-    msghdr.msg_iovlen = 1;
-
-    msghdr.msg_control = (caddr_t) cmptr;
-    msghdr.msg_controllen = CONTROLLEN;
-
-#endif
-
-
-#if defined(IOCHANNEL_TRANSFER_BSD)
-
-    if ( ( nRead = recvmsg(PipeFD, &msghdr, 0) ) > 0 )
-    {
-        OSL_TRACE("receiveFdPipe : received '%i' bytes",nRead);
-    }
-#else
-
-    if ( ( ( nRead = recvmsg(PipeFD, &msghdr, 0) ) > 0 ) &&
-         ( msghdr.msg_controllen == CONTROLLEN ) )
-    {
-        OSL_TRACE("receiveFdPipe : received '%i' bytes",nRead);
-        memcpy(&newfd, CMSG_DATA(cmptr), sizeof(int));
-    }
-#endif
-    else
-    {
-        OSL_TRACE("receiveFdPipe : receiving failed (%s)",strerror(errno));
-    }
-
-    if ( newfd >= 0 )
-    {
-        pSocket = __osl_createSocketImpl(newfd);
-        nRetCode=1;
-        OSL_TRACE("received fd %i",newfd);
-    }
-
-    OSL_TRACE("receiveFdPipe : writing back %i",nRetCode);
-    if ( !safeWrite(PipeFD, &nRetCode, sizeof(nRetCode)) )
-        OSL_TRACE("write failed (%s)", strerror(errno));
-
-    if ( nRead < 0 )
-    {
-        OSL_TRACE("write failed (%s)", strerror(errno));
-    }
-    else if ( nRead != sizeof(nRetCode) )
-    {
-        // TODO: Handle this case.
-        OSL_TRACE("partial write: wrote %d out of %d)", nRead, sizeof(nRetCode));
-    }
-
-#if defined(IOCHANNEL_TRANSFER_BSD_RENO)
-    free(cmptr);
-#endif
-
-    return pSocket;
-}
-
-/**********************************************
  osl_sendResourcePipe
  *********************************************/
 
 sal_Bool osl_sendResourcePipe(oslPipe pPipe, oslSocket pSocket)
 {
-    sal_Bool bRet = sal_False;
-
-    if ( pSocket == 0 || pPipe == 0 )
-    {
-        return sal_False;
-    }
-
-    bRet = sendFdPipe(pPipe->m_Socket,pSocket->m_Socket);
-
-    return bRet;
+    return osl_Process_E_InvalidError;
 }
 
 /**********************************************
@@ -415,16 +229,8 @@ sal_Bool osl_sendResourcePipe(oslPipe pPipe, oslSocket pSocket)
 
 oslSocket osl_receiveResourcePipe(oslPipe pPipe)
 {
-    oslSocket pSocket=0;
-
-    if ( pPipe ==  0 )
-    {
-        return 0;
-    }
-
-    pSocket = receiveFdPipe(pPipe->m_Socket);
-
-    return (oslSocket) pSocket;
+    oslSocket pSocket = 0;
+    return pSocket;
 }
 
 
commit c62f9a2907d3010a0a60309b6a94e9f72a34c01c
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Mar 16 20:26:13 2012 +0100

    nss: add parameter for solaris/gcc

diff --git a/nss/makefile.mk b/nss/makefile.mk
index 2bfa920..2a1dd0f 100644
--- a/nss/makefile.mk
+++ b/nss/makefile.mk
@@ -102,6 +102,9 @@ BUILD_ACTION= $(GNUMAKE) nss_build_all -j1
 .IF "$(OS)"=="LINUX"
 BUILD_ACTION+=FREEBL_NO_DEPEND=1
 .ENDIF
+.IF "$(OS)$(COM)"=="SOLARISGCC"
+BUILD_ACTION+=NS_USE_GCC=1
+.ENDIF
 
 .ENDIF			# "$(GUI)"=="UNX"
 
commit a2510538319ebe6898f945646e8e509508a2c026
Author: Jonathan Adams <t12nslookup at gmail.com>
Date:   Fri Mar 16 20:18:58 2012 +0100

    icc: clean up patch

diff --git a/icc/SampleICC-1.3.2.patch b/icc/SampleICC-1.3.2.patch
index e150a95..274b711 100644
--- a/icc/SampleICC-1.3.2.patch
+++ b/icc/SampleICC-1.3.2.patch
@@ -163,658 +163,32 @@
     {
       return (r_ != p.r_) ? (r_ < p.r_) : ((g_ != p.g_) ? (g_ < p.g_) : (b_ < p.b_));
     }
-*** misc/SampleICC-1.3.2/Contrib/ICC_utils/Vetters.cpp	Mon Aug 20 22:04:54 2007
---- misc/build/SampleICC-1.3.2/Contrib/ICC_utils/Vetters.cpp	Fri Jan 25 14:57:06 2008
-***************
-*** 1,322 ****
-! /*
-!  File:       Vetters.cpp
-!  
-!  Contains:   Utility functions to handle common argument-checking tasks, in a 
-!              way that hides platform-specific details from higher-level code.
-!  
-!  Version:    V1
-!  
-!  Copyright:  © see below
-!  */
-! 
-! /*
-!  * The ICC Software License, Version 0.1
-!  *
-!  *
-!  * Copyright (c) 2003-2006 The International Color Consortium. All rights 
-!  * reserved.
-!  *
-!  * Redistribution and use in source and binary forms, with or without
-!  * modification, are permitted provided that the following conditions
-!  * are met:
-!  *
-!  * 1. Redistributions of source code must retain the above copyright
-!  *    notice, this list of conditions and the following disclaimer. 
-!  *
-!  * 2. Redistributions in binary form must reproduce the above copyright
-!  *    notice, this list of conditions and the following disclaimer in
-!  *    the documentation and/or other materials provided with the
-!  *    distribution.
-!  *
-!  * 3. The end-user documentation included with the redistribution,
-!  *    if any, must include the following acknowledgment:  
-!  *       "This product includes software developed by the
-!  *        The International Color Consortium (www.color.org)"
-!  *    Alternately, this acknowledgment may appear in the software itself,
-!  *    if and wherever such third-party acknowledgments normally appear.
-!  *
-!  * 4. The names "ICC" and "The International Color Consortium" must
-!  *    not be used to imply that the ICC organization endorses or
-!  *    promotes products derived from this software without prior
-!  *    written permission. For written permission, please see
-!  *    <http://www.color.org/>.
-!  *
-!  *
-!  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
-!  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-!  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-!  * DISCLAIMED.  IN NO EVENT SHALL THE INTERNATIONAL COLOR CONSORTIUM OR
-!  * ITS CONTRIBUTING MEMBERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-!  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-!  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-!  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-!  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-!  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-!  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-!  * SUCH DAMAGE.
-!  * ====================================================================
-!  *
-!  * This software consists of voluntary contributions made by many
-!  * individuals on behalf of the The International Color Consortium. 
-!  *
-!  *
-!  * Membership in the ICC is encouraged when this software is used for
-!  * commercial purposes. 
-!  *
-!  *  
-!  * For more information on The International Color Consortium, please
-!  * see <http://www.color.org/>.
-!  *  
-!  * 
-!  */
-! 
-! ////////////////////////////////////////////////////////////////////// 
-! // HISTORY:
-! //
-! // -Initial implementation by Joseph Goldstone sumer 2007
-! //
-! //////////////////////////////////////////////////////////////////////
-! 
-! #include "Vetters.h"
-! 
-! #include <sstream>
-! using namespace std;
-! 
-! #ifndef WIN32
-! #include <sys/errno.h>
-! #else
-! #include <string.h>
-! int strerror_r(int errnum, char *str, int strsize)
-! {
-!   const char *errstr = strerror(errnum);
-! 
-!   if (errstr) {
-!     strncpy(str, errstr, strsize);
-!     return 0;
-!   }
-! 
-!   return -1;
-! }
-! #define stat _stat
-! #endif
-! 
-! #include "ICC_tool_exception.h"
-! 
-! const char*
-! path_tail(const char* const s)
-! {
-!   const char* tail = strdup(s);
-!   const char* last_slash = strrchr(tail, '/');
-!   if (last_slash != NULL)
-!     tail = last_slash + 1;
-!   return tail;
-! }
-!     
-! void
-! vet_as_int(const char* const s, const string& name,
-!            const string& description)
-! {
-!   istringstream ss(s);
-!   int i;
-!   ss >> i;
-!   if (ss.fail())
-!   {
-!     ostringstream oss;
-!     oss << "The " << name << " argument given, `" << s << "', cannot be parsed as"
-!       << " an integer.  It should be an integer representing "
-!       << description << ".";
-!     throw ICC_tool_exception(oss.str());
-!   }
-! }
-! 
-! void
-! vet_as_float(const char* const s, const string& name,
-!              const string& description)
-! {
-!   istringstream ss(s);
-!   float i;
-!   ss >> i;
-!   if (ss.fail())
-!   {
-!     ostringstream oss;
-!     oss << "The " << name << " argument given, `" << s << "', cannot be parsed as"
-!       << " a floating-point number.  It should be a floating-point number"
-!       << " representing " << description << ".";
-!     throw ICC_tool_exception(oss.str());
-!   }
-! }
-! 
-! #define STRERROR_BUF_SIZE 256
-! off_t
-! get_size(const char* const s)
-! { 
-!   struct stat sb;
-!   int stat_returned = stat(s, &sb);
-!   if (stat_returned < 0)
-!   {
-!     int stat_errno = errno;
-!     char strerror_buf[STRERROR_BUF_SIZE];
-!     strerror_r(stat_errno, strerror_buf, STRERROR_BUF_SIZE);
-!     ostringstream oss;
-!     oss << "Could not access information for file `" << s << "': "
-!       << strerror_buf;
-!     throw ICC_tool_exception(oss.str());
-!   }
-!   return sb.st_size;
-! }
-! 
-! bool
-! check_mode(const char* const s, mode_t mode)
-! { 
-!   struct stat sb;
-!   int stat_returned = stat(s, &sb);
-!   if (stat_returned < 0)
-!   {
-!     int stat_errno = errno;
-!     char strerror_buf[STRERROR_BUF_SIZE];
-!     strerror_r(stat_errno, strerror_buf, STRERROR_BUF_SIZE);
-!     ostringstream oss;
-!     oss << "Could not access information for file `" << s << "': "
-!       << strerror_buf;
-!     throw ICC_tool_exception(oss.str());
-!   }
-!   return (sb.st_mode & mode) != 0;
-! }
-! 
-! bool
-! is_existent_file_pathname(const char* const s)
-! {
-!   struct stat sb;
-!   return stat(s, &sb) == 0;
-! }
-! 
-! bool
-! is_plain_file_pathname(const char* const s)
-! {
-!   return check_mode(s, S_IFREG);
-! }
-! 
-! bool
-! is_directory(const char* const s)
-! {
-!   return check_mode(s, S_IFDIR);
-! }
-! 
-! const char* const
-! containing_directory(const char* const s)
-! {
-!   if (strlen(s) == 0)
-!     throw ICC_tool_exception("name of directory passed to containing_directory"
-!                              " function was zero-length.");
-!   char* tmp = strdup(s);
-!   // lop off any trailing seperator
-!   if (tmp[strlen(tmp) - 1] == '/')
-!     tmp[strlen(tmp) - 1] = 0;
-!   if (strlen(tmp) == 0)
-!     throw ICC_tool_exception("root directory (which has no containing"
-!                              " directory) passed to containing_directory"
-!                              " function");
-!   char* idx = strrchr(tmp, '/');
-!   if (idx != NULL)
-!   {
-!     *idx = 0;
-!     return tmp;
-!   }
-!   char* current_directory = getenv("PWD");
-!   if (current_directory == NULL)
-!     throw ICC_tool_exception("pathname passed to containing_directory has no"
-!                              " embedded seperator, and there is no value for"
-!                              " PWD defined in the environment");
-!   return strdup(current_directory);
-! }
-! 
-! bool
-! is_readable_pathname(const char* const s)
-! {
-!   return check_mode(s, S_IRUSR)
-!   || check_mode(s, S_IRGRP)
-!   || check_mode(s, S_IROTH);
-! }
-! 
-! bool
-! is_writable_pathname(const char* const s)
-! {
-!   return check_mode(s, S_IWUSR)
-!   || check_mode(s, S_IWGRP)
-!   || check_mode(s, S_IWOTH);
-! }
-! 
-! bool
-! is_pathname_of_empty_file(const char* const s)
-! {
-!   return get_size(s) > 0;
-! }
-! 
-! void
-! vet_input_file_pathname(const char* const s, const string& name,
-!                         const string& description)
-! {
-!   if (! is_plain_file_pathname(s))
-!   {
-!     ostringstream oss;
-!     oss << "The " << name << " argument given, `" << s << "', is not the pathname"
-!       << " of a plain file (i.e. it is the pathname of a directory, or of a"
-!       << " symbolic link, or of some other sort of special file.)  It should be"
-!       << " " << description << ".";
-!     throw ICC_tool_exception(oss.str());
-!   }
-!   if (! is_readable_pathname(s))
-!   {
-!     ostringstream oss;
-!     oss << "The " << name << " argument given, `" << s << "', is not the pathname"
-!       << " of a readable file (i.e. you do not have permission to read that"
-!       << " file, or you do not have permission to read some directory"
-!       << " containing that file.";
-!       throw ICC_tool_exception(oss.str());
-!   }
-!   if (! is_pathname_of_empty_file(s))
-!   {
-!     ostringstream oss;
-!     oss << "The " << name << " argument given, `" << s << "', is not the pathname"
-!       << " of an existing readable file, but that file is of zero length."
-!       << " The argument should be " << description << ".";
-!     throw ICC_tool_exception(oss.str());
-!   }
-! }
-! 
-! void
-! vet_output_file_pathname(const char* const s, const string& name,
-!                          const string& description,
-!                          bool silent_overwrite_OK)
-! {
-!   const char* const container = containing_directory(s);
-!   if (! is_writable_pathname(container))
-!   {
-!     ostringstream oss;
-!     oss << "The " << name << " argument given, `" << s << "', has a directory"
-!       << " component which is not writable."
-!       << " The argument should be " << description << ".";
-!     throw ICC_tool_exception(oss.str());
-!   }
-!   if (is_existent_file_pathname(s))
-!   {
-!     if (is_plain_file_pathname(s))
-!       if (is_writable_pathname(s))
-!       {
-!         if (! silent_overwrite_OK)
-!         {
-!           ostringstream oss;
-!           oss << "The " << name << " argument given, `" << s << "' is of an existing"
-!             << " file."
-!             << " The argument should be " << description << ".";
-!           throw ICC_tool_exception(oss.str());
-!         }
-!       } else {
-!         ostringstream oss;
-!         oss << "The " << name << " argument given, `" << s << "' is of an existing"
-!           << " file which is not writable."
-!           << " The argument should be " << description << ".";
-!         throw ICC_tool_exception(oss.str());
-!       }
-!   }
-! }
---- 1,325 ----
-! /*
-!  File:       Vetters.cpp
-!  
-!  Contains:   Utility functions to handle common argument-checking tasks, in a 
-!              way that hides platform-specific details from higher-level code.
-!  
-!  Version:    V1
-!  
-!  Copyright:  © see below
-!  */
-! 
-! /*
-!  * The ICC Software License, Version 0.1
-!  *
-!  *
-!  * Copyright (c) 2003-2006 The International Color Consortium. All rights 
-!  * reserved.
-!  *
-!  * Redistribution and use in source and binary forms, with or without
-!  * modification, are permitted provided that the following conditions
-!  * are met:
-!  *
-!  * 1. Redistributions of source code must retain the above copyright
-!  *    notice, this list of conditions and the following disclaimer. 
-!  *
-!  * 2. Redistributions in binary form must reproduce the above copyright
-!  *    notice, this list of conditions and the following disclaimer in
-!  *    the documentation and/or other materials provided with the
-!  *    distribution.
-!  *
-!  * 3. The end-user documentation included with the redistribution,
-!  *    if any, must include the following acknowledgment:  
-!  *       "This product includes software developed by the
-!  *        The International Color Consortium (www.color.org)"
-!  *    Alternately, this acknowledgment may appear in the software itself,
-!  *    if and wherever such third-party acknowledgments normally appear.
-!  *
-!  * 4. The names "ICC" and "The International Color Consortium" must
-!  *    not be used to imply that the ICC organization endorses or
-!  *    promotes products derived from this software without prior
-!  *    written permission. For written permission, please see
-!  *    <http://www.color.org/>.
-!  *
-!  *
-!  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
-!  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-!  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-!  * DISCLAIMED.  IN NO EVENT SHALL THE INTERNATIONAL COLOR CONSORTIUM OR
-!  * ITS CONTRIBUTING MEMBERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-!  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-!  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-!  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-!  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-!  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-!  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-!  * SUCH DAMAGE.
-!  * ====================================================================
-!  *
-!  * This software consists of voluntary contributions made by many
-!  * individuals on behalf of the The International Color Consortium. 
-!  *
-!  *
-!  * Membership in the ICC is encouraged when this software is used for
-!  * commercial purposes. 
-!  *
-!  *  
-!  * For more information on The International Color Consortium, please
-!  * see <http://www.color.org/>.
-!  *  
-!  * 
-!  */
-! 
-! ////////////////////////////////////////////////////////////////////// 
-! // HISTORY:
-! //
-! // -Initial implementation by Joseph Goldstone sumer 2007
-! //
-! //////////////////////////////////////////////////////////////////////
-! 
-! #include "Vetters.h"
-! 
-! #include <sstream>
-! using namespace std;
-! 
-! #ifndef WIN32
-! #include <errno.h>
-! #else
-! #include <string.h>
-! #define stat _stat
-! #endif
-! 
-! #if defined WIN32 || defined sun
-! int strerror_r(int errnum, char *str, int strsize)
-! {
-!   const char *errstr = strerror(errnum);
-! 
-!   if (errstr) {
-!     strncpy(str, errstr, strsize);
-!     return 0;
-!   }
-! 
-!   return -1;
-! }
-! #endif
-! 
-! #include "ICC_tool_exception.h"
-! 
-! const char*
-! path_tail(const char* const s)
-! {
-!   const char* tail = strdup(s);
-!   const char* last_slash = strrchr(tail, '/');
-!   if (last_slash != NULL)
-!     tail = last_slash + 1;
-!   return tail;
-! }
-!     
-! void
-! vet_as_int(const char* const s, const string& name,
-!            const string& description)
-! {
-!   istringstream ss(s);
-!   int i;
-!   ss >> i;
-!   if (ss.fail())
-!   {
-!     ostringstream oss;
-!     oss << "The " << name << " argument given, `" << s << "', cannot be parsed as"
-!       << " an integer.  It should be an integer representing "
-!       << description << ".";
-!     throw ICC_tool_exception(oss.str());
-!   }
-! }
-! 
-! void
-! vet_as_float(const char* const s, const string& name,
-!              const string& description)
-! {
-!   istringstream ss(s);
-!   float i;
-!   ss >> i;
-!   if (ss.fail())
-!   {
-!     ostringstream oss;
-!     oss << "The " << name << " argument given, `" << s << "', cannot be parsed as"
-!       << " a floating-point number.  It should be a floating-point number"
-!       << " representing " << description << ".";
-!     throw ICC_tool_exception(oss.str());
-!   }
-! }
-! 
-! #define STRERROR_BUF_SIZE 256
-! off_t
-! get_size(const char* const s)
-! { 
-!   struct stat sb;
-!   int stat_returned = stat(s, &sb);
-!   if (stat_returned < 0)
-!   {
-!     int stat_errno = errno;
-!     char strerror_buf[STRERROR_BUF_SIZE];
-!     strerror_r(stat_errno, strerror_buf, STRERROR_BUF_SIZE);
-!     ostringstream oss;
-!     oss << "Could not access information for file `" << s << "': "
-!       << strerror_buf;
-!     throw ICC_tool_exception(oss.str());
-!   }
-!   return sb.st_size;
-! }
-! 
-! bool
-! check_mode(const char* const s, mode_t mode)
-! { 
-!   struct stat sb;
-!   int stat_returned = stat(s, &sb);
-!   if (stat_returned < 0)
-!   {
-!     int stat_errno = errno;
-!     char strerror_buf[STRERROR_BUF_SIZE];
-!     strerror_r(stat_errno, strerror_buf, STRERROR_BUF_SIZE);
-!     ostringstream oss;
-!     oss << "Could not access information for file `" << s << "': "
-!       << strerror_buf;
-!     throw ICC_tool_exception(oss.str());
-!   }
-!   return (sb.st_mode & mode) != 0;
-! }
-! 
-! bool
-! is_existent_file_pathname(const char* const s)
-! {
-!   struct stat sb;
-!   return stat(s, &sb) == 0;
-! }
-! 
-! bool
-! is_plain_file_pathname(const char* const s)
-! {
-!   return check_mode(s, S_IFREG);
-! }
-! 
-! bool
-! is_directory(const char* const s)
-! {
-!   return check_mode(s, S_IFDIR);
-! }
-! 
-! const char* const
-! containing_directory(const char* const s)
-! {
-!   if (strlen(s) == 0)
-!     throw ICC_tool_exception("name of directory passed to containing_directory"
-!                              " function was zero-length.");
-!   char* tmp = strdup(s);
-!   // lop off any trailing seperator
-!   if (tmp[strlen(tmp) - 1] == '/')
-!     tmp[strlen(tmp) - 1] = 0;
-!   if (strlen(tmp) == 0)
-!     throw ICC_tool_exception("root directory (which has no containing"
-!                              " directory) passed to containing_directory"
-!                              " function");
-!   char* idx = strrchr(tmp, '/');
-!   if (idx != NULL)
-!   {
-!     *idx = 0;
-!     return tmp;
-!   }
-!   char* current_directory = getenv("PWD");
-!   if (current_directory == NULL)
-!     throw ICC_tool_exception("pathname passed to containing_directory has no"
-!                              " embedded seperator, and there is no value for"
-!                              " PWD defined in the environment");
-!   return strdup(current_directory);
-! }
-! 
-! bool
-! is_readable_pathname(const char* const s)
-! {
-!   return check_mode(s, S_IRUSR)
-!   || check_mode(s, S_IRGRP)
-!   || check_mode(s, S_IROTH);
-! }
-! 
-! bool
-! is_writable_pathname(const char* const s)
-! {
-!   return check_mode(s, S_IWUSR)
-!   || check_mode(s, S_IWGRP)
-!   || check_mode(s, S_IWOTH);
-! }
-! 
-! bool
-! is_pathname_of_empty_file(const char* const s)
-! {
-!   return get_size(s) > 0;
-! }
-! 
-! void
-! vet_input_file_pathname(const char* const s, const string& name,
-!                         const string& description)
-! {
-!   if (! is_plain_file_pathname(s))
-!   {
-!     ostringstream oss;
-!     oss << "The " << name << " argument given, `" << s << "', is not the pathname"
-!       << " of a plain file (i.e. it is the pathname of a directory, or of a"
-!       << " symbolic link, or of some other sort of special file.)  It should be"
-!       << " " << description << ".";
-!     throw ICC_tool_exception(oss.str());
-!   }
-!   if (! is_readable_pathname(s))
-!   {
-!     ostringstream oss;
-!     oss << "The " << name << " argument given, `" << s << "', is not the pathname"
-!       << " of a readable file (i.e. you do not have permission to read that"
-!       << " file, or you do not have permission to read some directory"
-!       << " containing that file.";
-!       throw ICC_tool_exception(oss.str());
-!   }
-!   if (! is_pathname_of_empty_file(s))
-!   {
-!     ostringstream oss;
-!     oss << "The " << name << " argument given, `" << s << "', is not the pathname"
-!       << " of an existing readable file, but that file is of zero length."
-!       << " The argument should be " << description << ".";
-!     throw ICC_tool_exception(oss.str());
-!   }
-! }
-! 
-! void
-! vet_output_file_pathname(const char* const s, const string& name,
-!                          const string& description,
-!                          bool silent_overwrite_OK)
-! {
-!   const char* const container = containing_directory(s);
-!   if (! is_writable_pathname(container))
-!   {
-!     ostringstream oss;
-!     oss << "The " << name << " argument given, `" << s << "', has a directory"
-!       << " component which is not writable."
-!       << " The argument should be " << description << ".";
-!     throw ICC_tool_exception(oss.str());
-!   }
-!   if (is_existent_file_pathname(s))
-!   {
-!     if (is_plain_file_pathname(s))
-!       if (is_writable_pathname(s))
-!       {
-!         if (! silent_overwrite_OK)
-!         {
-!           ostringstream oss;
-!           oss << "The " << name << " argument given, `" << s << "' is of an existing"
-!             << " file."
-!             << " The argument should be " << description << ".";
-!           throw ICC_tool_exception(oss.str());
-!         }
-!       } else {
-!         ostringstream oss;
-!         oss << "The " << name << " argument given, `" << s << "' is of an existing"
-!           << " file which is not writable."
-!           << " The argument should be " << description << ".";
-!         throw ICC_tool_exception(oss.str());
-!       }
-!   }
-! }
+--- misc/SampleICC-1.3.2/Contrib/ICC_utils/Vetters.cpp	2007-08-20 21:04:54.000000000 +0100
++++ misc/build/SampleICC-1.3.2/Contrib/ICC_utils/Vetters.cpp	2012-03-05 14:24:29.981346923 +0000
+@@ -83,9 +83,14 @@
+ using namespace std;
+ 
+ #ifndef WIN32
+-#include <sys/errno.h>
++#include <errno.h>
++#include <string.h>
+ #else
+ #include <string.h>
++#define stat _stat
++#endif
++
++#if defined WIN32 || defined sun
+ int strerror_r(int errnum, char *str, int strsize)
+ {
+   const char *errstr = strerror(errnum);
+@@ -97,7 +102,6 @@ int strerror_r(int errnum, char *str, in
+ 
+   return -1;
+ }
+-#define stat _stat
+ #endif
+ 
+ #include "ICC_tool_exception.h"
 *** misc/SampleICC-1.3.2/IccProfLib/IccIO.cpp	Mon Aug 20 22:05:00 2007
 --- misc/build/SampleICC-1.3.2/IccProfLib/IccIO.cpp	Fri Jan 25 14:23:09 2008
 ***************
commit ede2421f5c55366f3dea77fef5d580c47ed9eebc
Author: Jonathan Adams <t12nslookup at gmail.com>
Date:   Fri Mar 16 19:54:50 2012 +0100

    configure.in: use $GREP for non-standard features

diff --git a/configure.in b/configure.in
index 4fc314a..e44f014 100644
--- a/configure.in
+++ b/configure.in
@@ -30,8 +30,8 @@ PathFormat()
         if test "$pf_conv_to_dos" = "yes"; then
             formatted_path=`cygpath -d "$formatted_path"`
         fi
-        fp_count_colon=`echo "$formatted_path" | grep -c "[:]"`
-        fp_count_slash=`echo "$formatted_path" | grep -c "[/]"`
+        fp_count_colon=`echo "$formatted_path" | $GREP -c "[:]"`
+        fp_count_slash=`echo "$formatted_path" | $GREP -c "[/]"`
         if test "$fp_count_slash$fp_count_colon" != "00"; then
             if test "$fp_count_colon" = "0"; then
                 formatted_path=`realpath "$formatted_path"`
@@ -2758,7 +2758,7 @@ if test "$_os" = "WINNT"; then
     else
         AC_MSG_CHECKING([the compiler is MinGW])
         MACHINE_PREFIX=`$CC -dumpmachine`
-        if echo $MACHINE_PREFIX | grep -q mingw32; then
+        if echo $MACHINE_PREFIX | $GREP -q mingw32; then
             COMPATH=`echo "$COMPATH" | sed -e 's,/bin$,,'`
             AC_MSG_RESULT([yes])
         else
@@ -3592,7 +3592,7 @@ if test -z "$GNUMAKE"; then
 fi
 
 AC_MSG_CHECKING([the GNU make version])
-_make_version=`$GNUMAKE --version | grep GNU | grep -v GPL | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`;
+_make_version=`$GNUMAKE --version | grep GNU | $GREP -v GPL | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`;
 _make_longver=`echo $_make_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
 if test "$_make_longver" -ge "038200"; then
     AC_MSG_RESULT([$GNUMAKE $_make_version])
@@ -3771,7 +3771,7 @@ dnl ===================================================================
 if test $_os = Darwin; then
     AC_MSG_CHECKING([for bogus pkg-config])
     if test -n "$PKG_CONFIG"; then
-        if test "$PKG_CONFIG" = /usr/bin/pkg-config && ls -l /usr/bin/pkg-config | grep -q Mono.framework; then
+        if test "$PKG_CONFIG" = /usr/bin/pkg-config && ls -l /usr/bin/pkg-config | $GREP -q Mono.framework; then
             AC_MSG_RESULT([yes, from Mono])
         else
             AC_MSG_RESULT([yes, from unknown origin])
@@ -4124,7 +4124,7 @@ if test "$GXX" = "yes"; then
         if test "$with_gxx_include_path" = "/usr/libexec/(null)/include"; then
             with_gxx_include_path="/usr/include"
         fi
-        if echo $with_gxx_include_path | grep -q linux; then
+        if echo $with_gxx_include_path | $GREP -q linux; then
             # workaround for Mandriva - issue 100049
             with_gxx_include_path=`cd $with_gxx_include_path && pwd`
         fi
@@ -4606,7 +4606,7 @@ if test "$with_alloc" = "system"; then
 fi
 if test "$with_alloc" = "tcmalloc"; then
     AC_MSG_RESULT(tcmalloc)
-    if ! echo $host_cpu | grep -E 'i[[3456]]86' 2>/dev/null >/dev/null; then
+    if ! echo $host_cpu | $GREP -E 'i[[3456]]86' 2>/dev/null >/dev/null; then
         AC_MSG_ERROR([tcmalloc only available/usable on ix86])
     fi
     AC_CHECK_LIB([tcmalloc], [malloc], [:],
@@ -4744,15 +4744,15 @@ if test "$SOLAR_JAVA" != ""; then
         # Why is this necessary, we don't link with any library from the JDK I think,
 
         shortjdkhome=`cygpath -d "$with_jdk_home"`
-        if test "$CL_X64" != "" -a -f "$with_jdk_home/bin/java.exe" -a "`$shortjdkhome/bin/java.exe -version 2>&1 | grep -i 64-bit`" = "" >/dev/null; then
+        if test "$CL_X64" != "" -a -f "$with_jdk_home/bin/java.exe" -a "`$shortjdkhome/bin/java.exe -version 2>&1 | $GREP -i 64-bit`" = "" >/dev/null; then
             AC_MSG_WARN([You are building 64-bit binaries but the JDK $howfound is 32-bit])
             AC_MSG_ERROR([You should pass the --with-jdk-home option pointing to a 64-bit JDK])
-        elif test "$CL_X64" = "" -a -f "$_jdk_home/bin/java.exe" -a "`$shortjdkhome/bin/java.exe -version 2>&1 | grep -i 64-bit`" != ""  >/dev/null; then
+        elif test "$CL_X64" = "" -a -f "$_jdk_home/bin/java.exe" -a "`$shortjdkhome/bin/java.exe -version 2>&1 | $GREP -i 64-bit`" != ""  >/dev/null; then
             AC_MSG_WARN([You are building 32-bit binaries but the JDK $howfound is 64-bit])
             AC_MSG_ERROR([You should pass the --with-jdk-home option pointing to a (32-bit) JDK])
         fi
 
-        if test x`echo "$JAVAINTERPRETER" | grep -i '\.exe$'` = x; then
+        if test x`echo "$JAVAINTERPRETER" | $GREP -i '\.exe$'` = x; then
             JAVAINTERPRETER="${JAVAINTERPRETER}.exe"
         fi
         JAVAINTERPRETER=`cygpath -d "$JAVAINTERPRETER"`
@@ -4784,17 +4784,17 @@ if test "$SOLAR_JAVA" != ""; then
     AC_MSG_CHECKING([the installed JDK])
     if test -n "$JAVAINTERPRETER"; then
         dnl java -version sends output to stderr!
-        if test `$JAVAINTERPRETER -version 2>&1 | grep -c "Kaffe"` -gt 0; then
+        if test `$JAVAINTERPRETER -version 2>&1 | $GREP -c "Kaffe"` -gt 0; then
             AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.in])
-        elif test `$JAVAINTERPRETER --version 2>&1 | grep -c "GNU libgcj"` -gt 0; then
+        elif test `$JAVAINTERPRETER --version 2>&1 | $GREP -c "GNU libgcj"` -gt 0; then
             JDK=gcj
             AC_MSG_RESULT([checked (gcj)])
             _gij_version=`$JAVAINTERPRETER --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`;
             _gij_longver=`echo $_gij_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
 
-        elif test `$JAVAINTERPRETER -version 2>&1 | $AWK '{ print }' | grep -c "BEA"` -gt 0; then
+        elif test `$JAVAINTERPRETER -version 2>&1 | $AWK '{ print }' | $GREP -c "BEA"` -gt 0; then
             AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.in])
-        elif test `$JAVAINTERPRETER -version 2>&1 | $AWK '{ print }' | grep -c "IBM"` -gt 0; then
+        elif test `$JAVAINTERPRETER -version 2>&1 | $AWK '{ print }' | $GREP -c "IBM"` -gt 0; then
             JDK=ibm
 
             dnl IBM JDK specific tests
@@ -4887,14 +4887,14 @@ if test "$SOLAR_JAVA" != ""; then
         AC_MSG_ERROR([$javacompiler not found set with_jdk_home])
     fi
     if test "$build_os" = "cygwin" -a "$_os" = "WINNT"; then
-        if test x`echo "$JAVACOMPILER" | grep -i '\.exe$'` = x; then
+        if test x`echo "$JAVACOMPILER" | $GREP -i '\.exe$'` = x; then
             JAVACOMPILER="${JAVACOMPILER}.exe"
         fi
         JAVACOMPILER=`cygpath -d "$JAVACOMPILER"`
         JAVACOMPILER=`cygpath -u "$JAVACOMPILER"`
     fi
 
-    if test `$JAVACOMPILER -version 2>&1 | grep -c "Eclipse Java Compiler"` -gt 0; then
+    if test `$JAVACOMPILER -version 2>&1 | $GREP -c "Eclipse Java Compiler"` -gt 0; then
         AC_MSG_CHECKING([re-checking JDK])
         JDK=gcj
         AC_MSG_RESULT([checked (ecj)])
@@ -4909,7 +4909,7 @@ dnl ===================================================================
 dnl Checks that javac is gcj
 dnl ===================================================================
 if test "$SOLAR_JAVA" != ""; then
-    if test `$JAVACOMPILER --version 2>&1 | grep -c "GCC"` -gt 0; then
+    if test `$JAVACOMPILER --version 2>&1 | $GREP -c "GCC"` -gt 0; then
         JAVACISGCJ="yes"
     fi
 fi
@@ -4920,7 +4920,7 @@ dnl ===================================================================
 dnl Checks that javac is kaffe
 dnl ===================================================================
 if test "$SOLAR_JAVA" != ""; then
-    if test `$JAVACOMPILER -version 2>&1 | grep -c "Kaffe"` -gt 0; then
+    if test `$JAVACOMPILER -version 2>&1 | $GREP -c "Kaffe"` -gt 0; then
         JAVACISKAFFE="yes"
     fi
 fi
@@ -4945,7 +4945,7 @@ if test "$SOLAR_JAVA" != ""; then
         AC_MSG_ERROR([$_javadoc_path not found set with_jdk_home])
     fi
     if test "$build_os" = "cygwin" -a "$_os" = "WINNT"; then
-        if test x`echo "$JAVADOC" | grep -i '\.exe$'` = x; then
+        if test x`echo "$JAVADOC" | $GREP -i '\.exe$'` = x; then
             JAVADOC="${JAVADOC}.exe"
         fi
         JAVADOC=`cygpath -d "$JAVADOC"`
@@ -5610,7 +5610,7 @@ msi - Windows .msi
                     AC_MSG_RESULT([yes])
                 else
                     AC_MSG_RESULT([no])
-                    if echo "$PKGFORMAT" | grep -q rpm; then
+                    if echo "$PKGFORMAT" | $GREP -q rpm; then
                         _pt="rpm"
                         AC_MSG_WARN([the rpms will need to be installed with --nodeps])
                         echo "the rpms will need to be installed with --nodeps" >> warn
@@ -8189,7 +8189,7 @@ dnl ===================================================================
 dnl Zip must be a specific type for different build types.
 dnl ===================================================================
 if test $build_os = cygwin; then
-    if test -n "`$ZIP -h | grep -i WinNT`"; then
+    if test -n "`$ZIP -h | $GREP -i WinNT`"; then
         AC_MSG_ERROR([$ZIP is not the required Cygwin version of Info-ZIP's zip.exe.])
     fi
 fi
@@ -9761,7 +9761,7 @@ elif test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then
         XINERAMA_LINK=dynamic
     elif test -e "$XINERAMALIB/libXinerama.a"; then
         # static version
-        if echo $host_cpu | grep -E 'i[[3456]]86' 2>/dev/null >/dev/null; then
+        if echo $host_cpu | $GREP -E 'i[[3456]]86' 2>/dev/null >/dev/null; then
             USE_XINERAMA=YES
             XINERAMA_LINK=static
         else
@@ -10423,8 +10423,8 @@ if test "$SOLAR_JAVA" != "" -a "$with_junit" != "no"; then
     if test $? -eq 0; then
         # check if either class-path entry is available for hamcrest or
         # it's bundled
-        if "$JAVA_HOME/bin/jar" tf "$OOO_JUNIT_JAR" |grep -q hamcrest || \
-            "$UNZIP" -c "$OOO_JUNIT_JAR" META-INF/MANIFEST.MF |grep -q 'Class-Path: hamcrest'; then
+        if "$JAVA_HOME/bin/jar" tf "$OOO_JUNIT_JAR" |$GREP -q hamcrest || \
+            "$UNZIP" -c "$OOO_JUNIT_JAR" META-INF/MANIFEST.MF |$GREP -q 'Class-Path: hamcrest'; then
             AC_MSG_RESULT([$OOO_JUNIT_JAR])
         else
             AC_MSG_ERROR([your junit jar neither sets a classpath nor includes hamcrest; please
commit db96b0926794b53e547246e4c743e86f31eed461
Author: Jonathan Adams <t12nslookup at gmail.com>
Date:   Fri Mar 16 19:40:48 2012 +0100

    solaris/gcc: add missing standard includes

diff --git a/bridges/source/cpp_uno/gcc3_solaris_intel/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_solaris_intel/cpp2uno.cxx
index d16c068..0c73b56 100644
--- a/bridges/source/cpp_uno/gcc3_solaris_intel/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_solaris_intel/cpp2uno.cxx
@@ -28,6 +28,7 @@
 
 
 #include <sal/alloca.h>
+#include <strings.h>
 
 #include <com/sun/star/uno/genfunc.hxx>
 #include "com/sun/star/uno/RuntimeException.hpp"
diff --git a/bridges/source/cpp_uno/gcc3_solaris_intel/except.cxx b/bridges/source/cpp_uno/gcc3_solaris_intel/except.cxx
index 3ce09c3..7b8de07 100644
--- a/bridges/source/cpp_uno/gcc3_solaris_intel/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_solaris_intel/except.cxx
@@ -28,6 +28,7 @@
 
 
 #include <stdio.h>
+#include <strings.h>
 #include <dlfcn.h>
 #include <cxxabi.h>
 #include <boost/unordered_map.hpp>
diff --git a/soltools/adjustvisibility/adjustvisibility.cxx b/soltools/adjustvisibility/adjustvisibility.cxx
index a6e7c24..46dd776 100644
--- a/soltools/adjustvisibility/adjustvisibility.cxx
+++ b/soltools/adjustvisibility/adjustvisibility.cxx
@@ -37,6 +37,7 @@
  */
 
 #include <string>
+#include <cstring>
 #include <iostream>
 #include <exception>
 #include <stdexcept>


More information about the Libreoffice-commits mailing list