r14669 by cbradney - Hack for scclocale for opensolaris..
scribus-commit
scribus-commit at lists.scribus.net
Wed Feb 10 00:30:37 CET 2010
Revision: 14669
Author: cbradney
Date: 2010-02-09T23:22:54.586318Z
Commit message: Hack for scclocale for opensolaris..
Changeset:
M /trunk/Scribus/scribus/scclocale.cpp
M /trunk/Scribus/scribus/scclocale.h
Diffs:
Index: scribus/scclocale.cpp
===================================================================
--- scribus/scclocale.cpp (revision 14668)
+++ scribus/scclocale.cpp (revision 14669)
@@ -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
}
}
Index: scribus/scclocale.h
===================================================================
--- scribus/scclocale.h (revision 14668)
+++ scribus/scclocale.h (revision 14669)
@@ -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"
More information about the scribus-commit
mailing list