summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-06-11 16:54:45 +0200
committerNikita Popov <nikita.ppv@gmail.com>2019-06-11 16:54:45 +0200
commit2290102172dca043d1a44e17e12fe73b81c3b858 (patch)
tree981a36c8610ed5adee661e693154f85869d857d2
parent0849a621fd2b965edce74c10a916e46b9b328a6d (diff)
downloadphp-git-2290102172dca043d1a44e17e12fe73b81c3b858.tar.gz
Remove safeboolean use in gd_jpeg.c
This is a backport of https://github.com/libgd/libgd/blob/e5502c7a3f1fe60536ec060f0211d97066c006ea/src/gd_jpeg.c.
-rw-r--r--ext/gd/libgd/gd_jpeg.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/ext/gd/libgd/gd_jpeg.c b/ext/gd/libgd/gd_jpeg.c
index ef46c4a22c..3f0241a8e0 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;