044-use_facet.h.patch revision 402
--- stdcxx-4.2.1/src/use_facet.h 2008-04-24 20:25:19.000000000 -0400
+++ stdcxx-4.2.1/src/use_facet.h 2009-07-29 17:21:09.000000000 -0400
@@ -38,6 +38,16 @@
#include "access.h"
+#if defined(_RWSTD_STRICT_SPARCV8_MUTEX_ALIGNMENT)
+# pragma pack(8)
+# pragma align 8(f)
+# pragma align 8(pf)
+# define _FACET_UNION_ALIGNMENT_TYPE unsigned long long
+# define _FACET_UNION_BUFFER_TYPE unsigned char
+#else
+# define _FACET_UNION_ALIGNMENT_TYPE void*
+# define _FACET_UNION_BUFFER_TYPE char
+#endif
// helper macro _RWSTD_DEFINE_FACET_FACTORY() defines a facet factory
// function called to construct, on demand, objects of specializations
@@ -64,8 +74,9 @@
else { \
/* construct an ordinary facet in static memory */ \
static union { \
- void *align_; \
- char data_ [sizeof (__rw_ ## fid ## _facet)]; \
+ _FACET_UNION_ALIGNMENT_TYPE align_; \
+ _FACET_UNION_BUFFER_TYPE \
+ data_ [sizeof (__rw_ ## fid ## _facet)]; \
} f; \
static __rw_facet* const pf = \
new (&f) __rw_ ## fid ## _facet (ref); \
@@ -91,8 +102,9 @@
{ \
/* construct an ordinary facet in static memory */ \
static union { \
- void *align_; \
- char data_ [sizeof (__rw_ ## fid ## _facet)]; \
+ _FACET_UNION_ALIGNMENT_TYPE align_; \
+ _FACET_UNION_BUFFER_TYPE \
+ data_ [sizeof (__rw_ ## fid ## _facet)]; \
} f; \
static __rw_facet* const pf = \
new (&f) __rw_ ## fid ## _facet (ref); \
@@ -140,4 +152,8 @@
} \
typedef void __rw_unused_type
+#if defined(_RWSTD_STRICT_SPARCV8_MUTEX_ALIGNMENT)
+# pragma pack(0)
+#endif
+
#endif // _RWSTD_USE_FACET_H_INCLUDED