Commit 3ea4f70f authored by Manish Singh's avatar Manish Singh

actually builds and runs properly on big endian machines now, because we

* gdk/gdkrgb.c: actually builds and runs properly on big endian machines
now, because we #include config.h. Also fixed up a compile error in the
WORDS_BIGENDIAN case in gdk_rgb_convert_565_gray. I made the fix by looking
at patterns in the other code; Raph can you verify this?

* gdk/gdkthreads.c: #include <unistd.h> to quell compiler warnings

-Yosh
parent aa1bf581
Wed Jul 22 15:21:08 PDT 1998 Manish Singh <yosh@gimp.org>
* gdk/gdkrgb.c: actually builds and runs properly on big
endian machines now, because we #include config.h. Also
fixed up a compile error in the WORDS_BIGENDIAN case in
gdk_rgb_convert_565_gray. I made the fix by looking at
patterns in the other code; Raph can you verify this?
* gdk/gdkthreads.c: #include <unistd.h> to quell compiler
warnings
Wed Jul 22 23:00:44 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (tree_select/unselect) (tree_expand/collapse)
......@@ -232,7 +243,6 @@ Tue Jul 14 19:12:12 1998 Tim Janik <timj@gtk.org>
* gtk/gtkbutton.c (gtk_button_set_arg): don't destroy a buttons
child if it isn't a label.
>>>>>>> 1.520
Tue Jul 14 11:41:38 1998 Tim Janik <timj@gtk.org>
* gtk/gtkdialog.h:
......
Wed Jul 22 15:21:08 PDT 1998 Manish Singh <yosh@gimp.org>
* gdk/gdkrgb.c: actually builds and runs properly on big
endian machines now, because we #include config.h. Also
fixed up a compile error in the WORDS_BIGENDIAN case in
gdk_rgb_convert_565_gray. I made the fix by looking at
patterns in the other code; Raph can you verify this?
* gdk/gdkthreads.c: #include <unistd.h> to quell compiler
warnings
Wed Jul 22 23:00:44 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (tree_select/unselect) (tree_expand/collapse)
......@@ -232,7 +243,6 @@ Tue Jul 14 19:12:12 1998 Tim Janik <timj@gtk.org>
* gtk/gtkbutton.c (gtk_button_set_arg): don't destroy a buttons
child if it isn't a label.
>>>>>>> 1.520
Tue Jul 14 11:41:38 1998 Tim Janik <timj@gtk.org>
* gtk/gtkdialog.h:
......
Wed Jul 22 15:21:08 PDT 1998 Manish Singh <yosh@gimp.org>
* gdk/gdkrgb.c: actually builds and runs properly on big
endian machines now, because we #include config.h. Also
fixed up a compile error in the WORDS_BIGENDIAN case in
gdk_rgb_convert_565_gray. I made the fix by looking at
patterns in the other code; Raph can you verify this?
* gdk/gdkthreads.c: #include <unistd.h> to quell compiler
warnings
Wed Jul 22 23:00:44 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (tree_select/unselect) (tree_expand/collapse)
......@@ -232,7 +243,6 @@ Tue Jul 14 19:12:12 1998 Tim Janik <timj@gtk.org>
* gtk/gtkbutton.c (gtk_button_set_arg): don't destroy a buttons
child if it isn't a label.
>>>>>>> 1.520
Tue Jul 14 11:41:38 1998 Tim Janik <timj@gtk.org>
* gtk/gtkdialog.h:
......
Wed Jul 22 15:21:08 PDT 1998 Manish Singh <yosh@gimp.org>
* gdk/gdkrgb.c: actually builds and runs properly on big
endian machines now, because we #include config.h. Also
fixed up a compile error in the WORDS_BIGENDIAN case in
gdk_rgb_convert_565_gray. I made the fix by looking at
patterns in the other code; Raph can you verify this?
* gdk/gdkthreads.c: #include <unistd.h> to quell compiler
warnings
Wed Jul 22 23:00:44 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (tree_select/unselect) (tree_expand/collapse)
......@@ -232,7 +243,6 @@ Tue Jul 14 19:12:12 1998 Tim Janik <timj@gtk.org>
* gtk/gtkbutton.c (gtk_button_set_arg): don't destroy a buttons
child if it isn't a label.
>>>>>>> 1.520
Tue Jul 14 11:41:38 1998 Tim Janik <timj@gtk.org>
* gtk/gtkdialog.h:
......
Wed Jul 22 15:21:08 PDT 1998 Manish Singh <yosh@gimp.org>
* gdk/gdkrgb.c: actually builds and runs properly on big
endian machines now, because we #include config.h. Also
fixed up a compile error in the WORDS_BIGENDIAN case in
gdk_rgb_convert_565_gray. I made the fix by looking at
patterns in the other code; Raph can you verify this?
* gdk/gdkthreads.c: #include <unistd.h> to quell compiler
warnings
Wed Jul 22 23:00:44 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (tree_select/unselect) (tree_expand/collapse)
......@@ -232,7 +243,6 @@ Tue Jul 14 19:12:12 1998 Tim Janik <timj@gtk.org>
* gtk/gtkbutton.c (gtk_button_set_arg): don't destroy a buttons
child if it isn't a label.
>>>>>>> 1.520
Tue Jul 14 11:41:38 1998 Tim Janik <timj@gtk.org>
* gtk/gtkdialog.h:
......
Wed Jul 22 15:21:08 PDT 1998 Manish Singh <yosh@gimp.org>
* gdk/gdkrgb.c: actually builds and runs properly on big
endian machines now, because we #include config.h. Also
fixed up a compile error in the WORDS_BIGENDIAN case in
gdk_rgb_convert_565_gray. I made the fix by looking at
patterns in the other code; Raph can you verify this?
* gdk/gdkthreads.c: #include <unistd.h> to quell compiler
warnings
Wed Jul 22 23:00:44 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (tree_select/unselect) (tree_expand/collapse)
......@@ -232,7 +243,6 @@ Tue Jul 14 19:12:12 1998 Tim Janik <timj@gtk.org>
* gtk/gtkbutton.c (gtk_button_set_arg): don't destroy a buttons
child if it isn't a label.
>>>>>>> 1.520
Tue Jul 14 11:41:38 1998 Tim Janik <timj@gtk.org>
* gtk/gtkdialog.h:
......
Wed Jul 22 15:21:08 PDT 1998 Manish Singh <yosh@gimp.org>
* gdk/gdkrgb.c: actually builds and runs properly on big
endian machines now, because we #include config.h. Also
fixed up a compile error in the WORDS_BIGENDIAN case in
gdk_rgb_convert_565_gray. I made the fix by looking at
patterns in the other code; Raph can you verify this?
* gdk/gdkthreads.c: #include <unistd.h> to quell compiler
warnings
Wed Jul 22 23:00:44 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (tree_select/unselect) (tree_expand/collapse)
......@@ -232,7 +243,6 @@ Tue Jul 14 19:12:12 1998 Tim Janik <timj@gtk.org>
* gtk/gtkbutton.c (gtk_button_set_arg): don't destroy a buttons
child if it isn't a label.
>>>>>>> 1.520
Tue Jul 14 11:41:38 1998 Tim Janik <timj@gtk.org>
* gtk/gtkdialog.h:
......
......@@ -27,8 +27,9 @@
#define ENABLE_GRAYSCALE
#include <gdk/gdk.h>
#include <gdk/gdkprivate.h>
#include "../config.h"
#include "gdk/gdk.h"
#include "gdk/gdkprivate.h"
#include "gdkrgb.h"
typedef struct _GdkRgbInfo GdkRgbInfo;
......@@ -491,10 +492,10 @@ gdk_rgb_init (void)
/* check endian sanity */
#ifdef WORDS_BIGENDIAN
if (((char *)byte_order)[0] == 1)
g_error ("gtk_rgb_init: WORDS_BIGENDIAN is defined, but this is a little endian machine.\n\n");
g_error ("gdk_rgb_init: WORDS_BIGENDIAN is defined, but this is a little endian machine.\n\n");
#else
if (((char *)byte_order)[0] != 1)
g_error ("gtk_rgb_init: WORDS_BIGENDIAN is not defined, but this is a little endian machine.\n\n");
g_error ("gdk_rgb_init: WORDS_BIGENDIAN is not defined, but this is a little endian machine.\n\n");
#endif
if (image_info == NULL)
......@@ -1307,7 +1308,7 @@ gdk_rgb_convert_565_gray (GdkImage *image,
for (x = 0; x < width; x++)
{
g = *bp2++;
((guint16 *)obptr)[0] = ((g & 0xf8) << 8) |
((guint16 *)obuf)[x] = ((g & 0xf8) << 8) |
((g & 0xfc) << 3) |
(g >> 3);
}
......
......@@ -21,6 +21,7 @@
#include "gdkprivate.h"
#ifdef USE_PTHREADS
#include <unistd.h>
#include <pthread.h>
pthread_mutex_t gdk_threads_mutex = PTHREAD_MUTEX_INITIALIZER;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment