* avoid trying to overwrite values of a constant structure when
  updating the numeric locale data values used by glibc


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38623 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Oliver Tappe
2010-09-12 17:24:38 +00:00
parent 5d46644f18
commit 86932f41cc
3 changed files with 44 additions and 37 deletions
+25 -5
View File
@@ -14,6 +14,7 @@
struct lconv;
struct lc_time_t;
struct locale_data; // glibc
namespace BPrivate {
@@ -47,14 +48,33 @@ struct LocaleMonetaryDataBridge {
struct LocaleNumericDataBridge {
const char** addrOfGlibcDecimalPoint;
const char** addrOfGlibcThousandsSep;
const char** addrOfGlibcGrouping;
uint32_t* addrOfGlibcWCDecimalPoint;
uint32_t* addrOfGlibcWCThousandsSep;
private:
// struct used by glibc to store numeric locale data
struct GlibcNumericLocale {
const char* name;
const char* filedata;
off_t filesize;
int mmaped;
unsigned int usage_count;
int use_translit;
const char *options;
unsigned int nstrings;
union locale_data_value
{
const uint32_t* wstr;
const char* string;
unsigned int word;
}
values[6];
};
locale_data* originalGlibcLocale;
public:
const struct lconv* posixLocaleConv;
GlibcNumericLocale glibcNumericLocale;
LocaleNumericDataBridge();
~LocaleNumericDataBridge();
};