[haiku-commits] r37177 - haiku/branches/developer/zooey/posix-locale/src/system/libroot/posix/locale

  • From: zooey@xxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 19 Jun 2010 19:27:17 +0200 (CEST)

Author: zooey
Date: 2010-06-19 19:27:17 +0200 (Sat, 19 Jun 2010)
New Revision: 37177
Changeset: http://dev.haiku-os.org/changeset/37177/haiku

Modified:
   
haiku/branches/developer/zooey/posix-locale/src/system/libroot/posix/locale/Jamfile
   
haiku/branches/developer/zooey/posix-locale/src/system/libroot/posix/locale/localeconv.cpp
   
haiku/branches/developer/zooey/posix-locale/src/system/libroot/posix/locale/setlocale.cpp
Log:
* fix build

Modified: 
haiku/branches/developer/zooey/posix-locale/src/system/libroot/posix/locale/Jamfile
===================================================================
--- 
haiku/branches/developer/zooey/posix-locale/src/system/libroot/posix/locale/Jamfile
 2010-06-19 14:14:05 UTC (rev 37176)
+++ 
haiku/branches/developer/zooey/posix-locale/src/system/libroot/posix/locale/Jamfile
 2010-06-19 17:27:17 UTC (rev 37177)
@@ -1,5 +1,9 @@
 SubDir HAIKU_TOP src system libroot posix locale ;
 
+UseLibraryHeaders icu ;
+UsePrivateHeaders [ FDirName libroot locale ] ;
+UsePrivateHeaders [ FDirName libroot time ] ;
+
 MergeObject posix_locale.o :
        #ctype.c
        LocaleBackend.cpp
@@ -12,10 +16,6 @@
        #wcrtomb.c
 ;
 
-UseLibraryHeaders icu ;
-UsePrivateHeaders [ FDirName libroot locale ] ;
-UsePrivateHeaders [ FDirName libroot time ] ;
-
 SharedLibrary libroot-addon-locale.so
        :
        ICULocaleBackend.cpp

Modified: 
haiku/branches/developer/zooey/posix-locale/src/system/libroot/posix/locale/localeconv.cpp
===================================================================
--- 
haiku/branches/developer/zooey/posix-locale/src/system/libroot/posix/locale/localeconv.cpp
  2010-06-19 14:14:05 UTC (rev 37176)
+++ 
haiku/branches/developer/zooey/posix-locale/src/system/libroot/posix/locale/localeconv.cpp
  2010-06-19 17:27:17 UTC (rev 37177)
@@ -22,17 +22,17 @@
  * which is the default locale (and the only one supported without the backend)
  */
 static struct lconv sLocale = {
-       ".",            // decimal point
+       (char*)".",             // decimal point
 
-       "",                     // thousands separator
-       "",                     // grouping
-       "",                     // international currency symbol
-       "",                     // local currency symbol
-       "",                     // monetary decimal point
-       "",                     // monetary thousands separator
-       "",                     // monetary grouping
-       "",                     // positive sign
-       "",                     // negative sign
+       (char*)"",                      // thousands separator
+       (char*)"",                      // grouping
+       (char*)"",                      // international currency symbol
+       (char*)"",                      // local currency symbol
+       (char*)"",                      // monetary decimal point
+       (char*)"",                      // monetary thousands separator
+       (char*)"",                      // monetary grouping
+       (char*)"",                      // positive sign
+       (char*)"",                      // negative sign
 
        CHAR_MAX,       // int_frac_digits
        CHAR_MAX,       // frac_digits
@@ -56,7 +56,7 @@
 {
 #ifndef _KERNEL_MODE
        if (gLocaleBackend)
-               return gLocaleBackend->LocaleConv();
+               return const_cast<lconv*>(gLocaleBackend->LocaleConv());
 #endif
 
        return &sLocale;

Modified: 
haiku/branches/developer/zooey/posix-locale/src/system/libroot/posix/locale/setlocale.cpp
===================================================================
--- 
haiku/branches/developer/zooey/posix-locale/src/system/libroot/posix/locale/setlocale.cpp
   2010-06-19 14:14:05 UTC (rev 37176)
+++ 
haiku/branches/developer/zooey/posix-locale/src/system/libroot/posix/locale/setlocale.cpp
   2010-06-19 17:27:17 UTC (rev 37177)
@@ -7,6 +7,7 @@
 
 #include <locale.h>
 #include <stdlib.h>
+#include <string.h>
 
 #include "LocaleBackend.h"
 
@@ -73,7 +74,7 @@
                if (gLocaleBackend != NULL)
                        return 
const_cast<char*>(gLocaleBackend->SetLocale(category, NULL));
                else
-                       return "POSIX";
+                       return const_cast<char*>("POSIX");
        }
 
        // we may have to invoke SetLocale once for each category, so we use an
@@ -115,5 +116,5 @@
                return const_cast<char*>(gLocaleBackend->SetLocale(category, 
NULL));
        }
 
-       return "POSIX";
+       return const_cast<char*>("POSIX");
 }


Other related posts:

  • » [haiku-commits] r37177 - haiku/branches/developer/zooey/posix-locale/src/system/libroot/posix/locale - zooey