diff options
author | Owen Taylor <otaylor@redhat.com> | 2003-08-18 15:17:03 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2003-08-18 15:17:03 +0000 |
commit | 10dd4ec450527fd122ceb1c5e11ed8e75e6cf0cf (patch) | |
tree | c0071ea8840f08ec353a2daac5cded9a2057aa84 /gdk-pixbuf | |
parent | 3ec83873060b5a57b93a7b894c21eff5d2d7181f (diff) | |
download | gdk-pixbuf-10dd4ec450527fd122ceb1c5e11ed8e75e6cf0cf.tar.gz |
Add the correct alignment magic for Sun compiler and for GCC to get the
Mon Aug 18 10:25:29 2003 Owen Taylor <otaylor@redhat.com>
* gdk-pixdata.c (gdk_pixdata_to_csource): Add the correct
alignment magic for Sun compiler and for GCC to get
the strings aligned. (Patch from Brian Cameron, #117217)
Diffstat (limited to 'gdk-pixbuf')
-rw-r--r-- | gdk-pixbuf/gdk-pixdata.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gdk-pixbuf/gdk-pixdata.c b/gdk-pixbuf/gdk-pixdata.c index f8730c301..445e7adf7 100644 --- a/gdk-pixbuf/gdk-pixdata.c +++ b/gdk-pixbuf/gdk-pixdata.c @@ -727,10 +727,22 @@ gdk_pixdata_to_csource (GdkPixdata *pixdata, img_buffer = stream; img_buffer_end = stream + stream_length; + APPEND (gstring, "#ifdef __SUNPRO_C\n"); + APPEND (gstring, "#pragma align 4 (%s)\n", name); + APPEND (gstring, "#endif\n"); + + APPEND (gstring, "#ifdef __GNUC__\n"); + APPEND (gstring, "%s%s%s %s[] __attribute__ ((__aligned__ (4))) = \n", + cdata.static_prefix, cdata.const_prefix, + cdata.dump_gtypes ? "guint8" : "unsigned char", + name); + APPEND (gstring, "#else\n"); APPEND (gstring, "%s%s%s %s[] = \n", cdata.static_prefix, cdata.const_prefix, cdata.dump_gtypes ? "guint8" : "unsigned char", name); + APPEND (gstring, "#endif\n"); + APPEND (gstring, "{ \"\"\n /* Pixbuf magic (0x%x) */\n \"", GDK_PIXBUF_MAGIC_NUMBER); cdata.pos = 3; |