summaryrefslogtreecommitdiff
path: root/pango/pango-language.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2008-11-19 19:52:30 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2008-11-19 19:52:30 +0000
commit61ccfaedf174ffc7178cff16181e0e95005bb4f4 (patch)
tree0a48671dc90049fa2c2190b0967b76ba7f9217ac /pango/pango-language.c
parent76aedda6e9a42dc7074c4addeed2843f877080ed (diff)
downloadpango-61ccfaedf174ffc7178cff16181e0e95005bb4f4.tar.gz
Bug 560730 – pango 1.22.2 build failure on Solaris 10, too many array
2008-11-19 Behdad Esfahbod <behdad@gnome.org> Bug 560730 – pango 1.22.2 build failure on Solaris 10, too many array initializers in pango-language.c * pango/pango-language.c: Don't use anonymous struct. svn path=/trunk/; revision=2738
Diffstat (limited to 'pango/pango-language.c')
-rw-r--r--pango/pango-language.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/pango/pango-language.c b/pango/pango-language.c
index 6eac5df8..9f29563a 100644
--- a/pango/pango-language.c
+++ b/pango/pango-language.c
@@ -481,13 +481,15 @@ typedef struct {
/* Pure black magic, based on appendix of dsohowto.pdf */
#define POOLSTRFIELD(line) POOLSTRFIELD1(line)
#define POOLSTRFIELD1(line) str##line
-static const union _LangPool {
- struct {
- char str0[1];
+struct _LangPoolStruct {
+ char str0[1];
#define LANGUAGE(id, source, sample) char POOLSTRFIELD(__LINE__)[sizeof(sample)];
#include "pango-language-sample-table.h"
#undef LANGUAGE
- };
+};
+
+static const union _LangPool {
+ struct _LangPoolStruct lang_pool_struct;
const char str[1];
} lang_pool = { {
"",
@@ -496,7 +498,7 @@ static const union _LangPool {
#undef LANGUAGE
} };
static const LangInfo lang_texts[] = {
-#define LANGUAGE(id, source, sample) {G_STRINGIFY(id), G_STRUCT_OFFSET(union _LangPool, POOLSTRFIELD(__LINE__))},
+#define LANGUAGE(id, source, sample) {G_STRINGIFY(id), G_STRUCT_OFFSET(struct _LangPoolStruct, POOLSTRFIELD(__LINE__))},
#include "pango-language-sample-table.h"
#undef LANGUAGE
/* One extra entry with no final comma, to make it C89-happy */