r14670 by cbradney - Backport LCMS finder update and scclocale solaris update

scribus-commit scribus-commit at lists.scribus.net
Wed Feb 10 00:30:58 CET 2010


Revision: 14670
Author: cbradney
Date: 2010-02-09T23:26:14.490304Z
Commit message: Backport LCMS finder update and scclocale solaris update

Changeset: 
M  /branches/Version135/Scribus/scribus/scclocale.cpp
M  /branches/Version135/Scribus/cmake/modules/FindLCMS.cmake
M  /branches/Version135/Scribus/scribus/scclocale.h

Diffs:
Index: cmake/modules/FindLCMS.cmake
===================================================================
--- cmake/modules/FindLCMS.cmake	(revision 14669)
+++ cmake/modules/FindLCMS.cmake	(revision 14670)
@@ -19,8 +19,9 @@
 # SET(LCMS_LIBS ${_lcmsCflags})
 
 FIND_PATH(LCMS_INCLUDE_DIR lcms.h
-/usr/include
-/usr/local/include
+  /usr/include
+  /usr/local/include
+  PATH_SUFFIXES lcms
 )
 
 FIND_LIBRARY(LCMS_LIBRARY_RELEASE
Index: scribus/scclocale.h
===================================================================
--- scribus/scclocale.h	(revision 14669)
+++ scribus/scclocale.h	(revision 14670)
@@ -28,7 +28,11 @@
 #if defined(Q_WS_WIN)
 #define XLocaleType _locale_t
 #else
-#define XLocaleType locale_t
+  #if defined (Q_OS_SOLARIS)
+  #define XLocaleType char*;//dummy?
+  #else
+  #define XLocaleType locale_t
+  #endif
 #endif
 
 #include "scribusapi.h"
Index: scribus/scclocale.cpp
===================================================================
--- scribus/scclocale.cpp	(revision 14669)
+++ scribus/scclocale.cpp	(revision 14670)
@@ -22,7 +22,9 @@
 #if defined(Q_WS_WIN)
 	cLocale = _create_locale(LC_ALL, "C");
 #else
+  #if not defined(Q_OS_SOLARIS
 	cLocale = newlocale(LC_ALL_MASK, "C", NULL);
+  #endif
 #endif
 }
 
@@ -31,7 +33,9 @@
 #if defined(Q_WS_WIN)
 	_free_locale(cLocale);
 #else
+  #if not defined(Q_OS_SOLARIS
 	freelocale(cLocale);
+  #endif
 #endif
 }
 
@@ -104,7 +108,16 @@
 #if defined(Q_WS_WIN)
 		return _strtod_l(str, endptr, that()->cLocale);
 #else
+  #if defined(Q_OS_SOLARIS)
 		return strtod_l(str, endptr, that()->cLocale);
+  #else
+		char *oldlocale=setlocale(LC_NUMERIC, NULL);
+		double result(0.0);
+		setlocale(LC_NUMERIC, "C");
+		result = strtod(str, endptr);
+                setlocale(LC_NUMERIC, oldlocale);
+		return result;
+  #endif
 #endif
 	}
 }




More information about the scribus-commit mailing list