gint byte_order[1] = { 1 };
/* check endian sanity */
-#ifdef WORDS_BIGENDIAN
+#if G_BYTE_ORDER == G_BIG_ENDIAN
if (((char *)byte_order)[0] == 1)
- g_error ("gdk_rgb_init: WORDS_BIGENDIAN is defined, but this is a little endian machine.\n\n");
+ g_error ("gdk_rgb_init: compiled for big endian, but this is a little endian machine.\n\n");
#else
if (((char *)byte_order)[0] != 1)
- g_error ("gdk_rgb_init: WORDS_BIGENDIAN is not defined, but this is a big endian machine.\n\n");
+ g_error ("gdk_rgb_init: compiled for little endian, but this is a big endian machine.\n\n");
#endif
if (image_info == NULL)
gulong
gdk_rgb_xpixel_from_rgb (guint32 rgb)
{
- gulong pixel;
+ gulong pixel = 0;
if (image_info->bitmap)
{
gdk_gc_set_background (gc, &color);
}
-#ifndef WORDS_BIGENDIAN
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
#define HAIRY_CONVERT_8
#endif
}
}
-#ifndef WORDS_BIGENDIAN
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
#define HAIRY_CONVERT_565
#endif
}
/* todo: optimize this */
-#ifndef WORDS_BIGENDIAN
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
#define HAIRY_CONVERT_888
#endif
(gint)(((GdkVisualPrivate *)image_info->visual)->xvisual->visualid),
bpp, byte_order == GDK_LSB_FIRST ? "lsb" : "msb");
-#ifdef WORDS_BIGENDIAN
+#if G_BYTE_ORDER == G_BIG_ENDIAN
byterev = (byte_order == GDK_LSB_FIRST);
#else
byterev = (byte_order == GDK_MSB_FIRST);
((mask_rgb && byte_order == GDK_MSB_FIRST) ||
(mask_bgr && byte_order == GDK_LSB_FIRST)))
conv = gdk_rgb_convert_888_msb;
-#ifdef WORDS_BIGENDIAN
+#if G_BYTE_ORDER == G_BIG_ENDIAN
else if (bpp == 32 && depth == 24 && vtype == GDK_VISUAL_TRUE_COLOR &&
(mask_rgb && byte_order == GDK_LSB_FIRST))
conv = gdk_rgb_convert_0888_br;