|
1 --- stdcxx-4.2.1/src/locale_body.cpp 2008-04-24 20:25:19.000000000 -0400 |
|
2 +++ stdcxx-4.2.1/src/locale_body.cpp 2009-07-29 14:53:30.000000000 -0400 |
|
3 @@ -126,7 +126,7 @@ |
|
4 // and ctype<wchar_t> from "ja_JP", etc.) |
|
5 |
|
6 char* __rw_locale:: |
|
7 -_C_get_cat_names (char *buf, size_t bufsize) const |
|
8 +_C_get_cat_names (char *buf, _RWSTD_SIZE_T bufsize) const |
|
9 { |
|
10 const size_t savesize = bufsize; |
|
11 char *savebuf = buf; |
|
12 @@ -584,7 +584,7 @@ |
|
13 _C_byname_facet_bits = _C_all; |
|
14 } |
|
15 |
|
16 -#if defined (__i386__) || !defined (__GNUG__) || __GNUG__ < 3 |
|
17 +#if defined (__i386__) || !defined (__GNUG__) || (__GNUG__ < 3) || defined(__SUNPRO_CC) |
|
18 |
|
19 memset (_C_std_facets, 0, sizeof _C_std_facets); |
|
20 |
|
21 @@ -1009,15 +1009,28 @@ |
|
22 |
|
23 // the classic C locale is statically allocated |
|
24 // and not destroyed during the lifetime of the process |
|
25 + |
|
26 +#if defined(_RWSTD_STRICT_SPARCV8_MUTEX_ALIGNMENT) |
|
27 +# pragma pack(8) |
|
28 +# pragma align 8(classic_body) |
|
29 +#endif |
|
30 static union { |
|
31 +#if defined(_RWSTD_STRICT_SPARCV8_MUTEX_ALIGNMENT) |
|
32 + unsigned long long _C_align; |
|
33 + unsigned char _C_buf [sizeof (__rw_locale)]; |
|
34 +#else |
|
35 void* _C_align; |
|
36 char _C_buf [sizeof (__rw_locale)]; |
|
37 +#endif |
|
38 } classic_body; |
|
39 |
|
40 // construct a locale body in place |
|
41 // with the initial reference count of 1 |
|
42 classic = new (&classic_body) __rw_locale (locname); |
|
43 |
|
44 +#if defined(_RWSTD_STRICT_SPARCV8_MUTEX_ALIGNMENT) |
|
45 +# pragma pack(0) |
|
46 +#endif |
|
47 _RWSTD_ASSERT (1 == classic->_C_ref); |
|
48 } |
|
49 else { |