summaryrefslogtreecommitdiff
path: root/src/bin/jp2
diff options
context:
space:
mode:
authorMathieu Malaterre <mathieu.malaterre@gmail.com>2014-03-18 14:37:33 +0000
committerMathieu Malaterre <mathieu.malaterre@gmail.com>2014-03-18 14:37:33 +0000
commitae49fd1aa9ef6409d958255c1461a8222e2a9ae4 (patch)
tree83e194dfbaf5047b051b4ea0ff6978d9afc306b3 /src/bin/jp2
parent79d18f7fd09d26f57c8ed5cbaac9e684a947630f (diff)
[trunk] Update big endian handling no such thing as WORDS_BIGENDIAN (prefer OPJ_BIG_ENDIAN)
Update issue 302
Diffstat (limited to 'src/bin/jp2')
-rw-r--r--src/bin/jp2/convert.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/jp2/convert.c b/src/bin/jp2/convert.c
index 3588700b..2ab6d628 100644
--- a/src/bin/jp2/convert.c
+++ b/src/bin/jp2/convert.c
@@ -94,7 +94,7 @@ struct tga_header
static unsigned short get_ushort(unsigned short val) {
-#ifdef WORDS_BIGENDIAN
+#ifdef OPJ_BIG_ENDIAN
return( ((val & 0xff) << 8) + (val >> 8) );
#else
return( val );
@@ -181,7 +181,7 @@ static int tga_readheader(FILE *fp, unsigned int *bits_per_pixel,
return 1;
}
-#if WORDS_BIGENDIAN == 1
+#ifdef OPJ_BIG_ENDIAN
static INLINE int16_t swap16(int16_t x)
{
@@ -228,7 +228,7 @@ static int tga_writeheader(FILE *fp, int bits_per_pixel, int width, int height,
image_w = (unsigned short)width;
image_h = (unsigned short) height;
-#if WORDS_BIGENDIAN == 0
+#ifndef OPJ_BIG_ENDIAN
if(fwrite(&image_w, 2, 1, fp) != 1) goto fails;
if(fwrite(&image_h, 2, 1, fp) != 1) goto fails;
#else