summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfoobar <sniper@php.net>2002-07-12 22:34:43 +0000
committerfoobar <sniper@php.net>2002-07-12 22:34:43 +0000
commit48634e402662f45721c61318ec9cb015e00953f6 (patch)
tree2c50ec39396ba25411e00c0644cd18ddfde73d38
parent7b0b6d0b8cbfe12e300ba20f84d80984888d6ee4 (diff)
downloadphp-git-48634e402662f45721c61318ec9cb015e00953f6.tar.gz
- Fixed compile (bug #18297) on such systems which define uchar.
-rw-r--r--ext/standard/image.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/ext/standard/image.c b/ext/standard/image.c
index b579da9ed7..80815e79d0 100644
--- a/ext/standard/image.c
+++ b/ext/standard/image.c
@@ -589,8 +589,6 @@ PHPAPI const int php_tiff_bytes_per_format[] = {0, 1, 1, 2, 4, 8, 1, 1, 2, 4, 8,
#define TAG_FMT_SRATIONAL 10
#define TAG_FMT_SINGLE 11
#define TAG_FMT_DOUBLE 12
-
-typedef unsigned char uchar;
/* }}} */
/* {{{ php_ifd_get16u
@@ -598,9 +596,9 @@ typedef unsigned char uchar;
static int php_ifd_get16u(void *Short, int motorola_intel)
{
if (motorola_intel) {
- return (((uchar *)Short)[0] << 8) | ((uchar *)Short)[1];
+ return (((unsigned char *)Short)[0] << 8) | ((unsigned char *)Short)[1];
} else {
- return (((uchar *)Short)[1] << 8) | ((uchar *)Short)[0];
+ return (((unsigned char *)Short)[1] << 8) | ((unsigned char *)Short)[0];
}
}
/* }}} */
@@ -618,11 +616,11 @@ static signed short php_ifd_get16s(void *Short, int motorola_intel)
static int php_ifd_get32s(void *Long, int motorola_intel)
{
if (motorola_intel) {
- return ((( char *)Long)[0] << 24) | (((uchar *)Long)[1] << 16)
- | (((uchar *)Long)[2] << 8 ) | (((uchar *)Long)[3] << 0 );
+ return ((( char *)Long)[0] << 24) | (((unsigned char *)Long)[1] << 16)
+ | (((unsigned char *)Long)[2] << 8 ) | (((unsigned char *)Long)[3] << 0 );
} else {
- return ((( char *)Long)[3] << 24) | (((uchar *)Long)[2] << 16)
- | (((uchar *)Long)[1] << 8 ) | (((uchar *)Long)[0] << 0 );
+ return ((( char *)Long)[3] << 24) | (((unsigned char *)Long)[2] << 16)
+ | (((unsigned char *)Long)[1] << 8 ) | (((unsigned char *)Long)[0] << 0 );
}
}
/* }}} */