diff options
Diffstat (limited to 'apps/x11_image.c')
-rw-r--r-- | apps/x11_image.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/x11_image.c b/apps/x11_image.c index 35b32c7e..06764313 100644 --- a/apps/x11_image.c +++ b/apps/x11_image.c @@ -22,6 +22,12 @@ extern int ffs(int); +static int is_big_endian(void) +{ + static const int one = 1; + return *(char*)&one == 0; +} + typedef void (*ximage_convert_func_t) ( const unsigned char *src, @@ -212,7 +218,7 @@ select_mode(void) unsigned long rs, gs, bs; byteorder = ImageByteOrder(info.display); - if (fz_is_big_endian()) + if (is_big_endian()) byterev = byteorder != MSBFirst; else byterev = byteorder != LSBFirst; |