com php-src: Remove safeboolean use in gd_jpeg.c: ext/g d/libgd/gd_jpeg.c
| From: | Nikita Popov | Date: | Tue, 11 Jun 2019 14:54:45 +0000 |
| Subject: | com php-src: Remove safeboolean use in gd_jpeg.c: ext/g d/libgd/gd_jpeg.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-106683@lists.php.net to get a copy of this message | ||
Commit: 2290102172dca043d1a44e17e12fe73b81c3b858
Author: Nikita Popov <nikita.ppv@gmail.com> Tue, 11 Jun 2019 16:54:45 +0200
Parents: 0849a621fd2b965edce74c10a916e46b9b328a6d
Branches: PHP-7.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2290102172dca043d1a44e17e12fe73b81c3b858
Log:
Remove safeboolean use in gd_jpeg.c
This is a backport of
https://github.com/libgd/libgd/blob/e5502c7a3f1fe60536ec060f0211d97066c006ea/src/gd_jpeg.c.
Changed paths:
M ext/gd/libgd/gd_jpeg.c
Diff:
diff --git a/ext/gd/libgd/gd_jpeg.c b/ext/gd/libgd/gd_jpeg.c
index ef46c4a..3f0241a 100644
--- a/ext/gd/libgd/gd_jpeg.c
+++ b/ext/gd/libgd/gd_jpeg.c
@@ -542,19 +542,6 @@ static int CMYKToRGB(int c, int m, int y, int k, int inverted)
*
*/
-/* Different versions of libjpeg use either 'jboolean' or 'boolean', and
- some platforms define 'boolean', and so forth. Deal with this
- madness by typedeffing 'safeboolean' to 'boolean' if HAVE_BOOLEAN
- is already set, because this is the test that libjpeg uses.
- Otherwise, typedef it to int, because that's what libjpeg does
- if HAVE_BOOLEAN is not defined. -TBB */
-
-#ifdef HAVE_BOOLEAN
-typedef boolean safeboolean;
-#else
-typedef int safeboolean;
-#endif /* HAVE_BOOLEAN */
-
/* Expanded data source object for gdIOCtx input */
typedef struct
@@ -563,7 +550,7 @@ typedef struct
gdIOCtx *infile; /* source stream */
unsigned char *buffer; /* start of buffer */
- safeboolean start_of_file; /* have we gotten any data yet? */
+ boolean start_of_file; /* have we gotten any data yet? */
} my_source_mgr;
typedef my_source_mgr *my_src_ptr;
@@ -622,7 +609,7 @@ void init_source (j_decompress_ptr cinfo)
#define END_JPEG_SEQUENCE "\r\n[*]--:END JPEG:--[*]\r\n"
-safeboolean fill_input_buffer (j_decompress_ptr cinfo)
+boolean fill_input_buffer (j_decompress_ptr cinfo)
{
my_src_ptr src = (my_src_ptr) cinfo->src;
/* 2.0.12: signed size. Thanks to Geert Jansen */
@@ -813,7 +800,7 @@ void init_destination (j_compress_ptr cinfo)
* write it out when emptying the buffer externally.
*/
-safeboolean empty_output_buffer (j_compress_ptr cinfo)
+boolean empty_output_buffer (j_compress_ptr cinfo)
{
my_dest_ptr dest = (my_dest_ptr) cinfo->dest;