cvs: php4 /ext/standard image.c

From: Date: Fri, 12 Jul 2002 22:34:43 +0000
Subject: cvs: php4 /ext/standard image.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-12801@lists.php.net to get a copy of this message
sniper Fri Jul 12 18:34:43 2002 EDT Modified files: /php4/ext/standard image.c Log: - Fixed compile (bug #18297) on such systems which define uchar. Index: php4/ext/standard/image.c diff -u php4/ext/standard/image.c:1.65 php4/ext/standard/image.c:1.66 --- php4/ext/standard/image.c:1.65 Mon Jul 8 08:52:22 2002 +++ php4/ext/standard/image.c Fri Jul 12 18:34:43 2002 @@ -16,7 +16,7 @@ | Marcus Boerger <helly@php.net> | +----------------------------------------------------------------------+ */ -/* $Id: image.c,v 1.65 2002/07/08 12:52:22 derick Exp $ */ +/* $Id: image.c,v 1.66 2002/07/12 22:34:43 sniper Exp $ */ /* * Based on Daniel Schmitt's imageinfo.c which carried the following * Copyright notice. @@ -589,8 +589,6 @@ #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 @@ 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 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 ); } } /* }}} */

« previous php.cvs (#12801) next »