Skip to content

Commit 2290102

Browse files
committed
1 parent 0849a62 commit 2290102

File tree

1 file changed

+3
-16
lines changed

1 file changed

+3
-16
lines changed

ext/gd/libgd/gd_jpeg.c

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -542,19 +542,6 @@ static int CMYKToRGB(int c, int m, int y, int k, int inverted)
542542
*
543543
*/
544544

545-
/* Different versions of libjpeg use either 'jboolean' or 'boolean', and
546-
some platforms define 'boolean', and so forth. Deal with this
547-
madness by typedeffing 'safeboolean' to 'boolean' if HAVE_BOOLEAN
548-
is already set, because this is the test that libjpeg uses.
549-
Otherwise, typedef it to int, because that's what libjpeg does
550-
if HAVE_BOOLEAN is not defined. -TBB */
551-
552-
#ifdef HAVE_BOOLEAN
553-
typedef boolean safeboolean;
554-
#else
555-
typedef int safeboolean;
556-
#endif /* HAVE_BOOLEAN */
557-
558545
/* Expanded data source object for gdIOCtx input */
559546

560547
typedef struct
@@ -563,7 +550,7 @@ typedef struct
563550

564551
gdIOCtx *infile; /* source stream */
565552
unsigned char *buffer; /* start of buffer */
566-
safeboolean start_of_file; /* have we gotten any data yet? */
553+
boolean start_of_file; /* have we gotten any data yet? */
567554
} my_source_mgr;
568555

569556
typedef my_source_mgr *my_src_ptr;
@@ -622,7 +609,7 @@ void init_source (j_decompress_ptr cinfo)
622609

623610
#define END_JPEG_SEQUENCE "\r\n[*]--:END JPEG:--[*]\r\n"
624611

625-
safeboolean fill_input_buffer (j_decompress_ptr cinfo)
612+
boolean fill_input_buffer (j_decompress_ptr cinfo)
626613
{
627614
my_src_ptr src = (my_src_ptr) cinfo->src;
628615
/* 2.0.12: signed size. Thanks to Geert Jansen */
@@ -813,7 +800,7 @@ void init_destination (j_compress_ptr cinfo)
813800
* write it out when emptying the buffer externally.
814801
*/
815802

816-
safeboolean empty_output_buffer (j_compress_ptr cinfo)
803+
boolean empty_output_buffer (j_compress_ptr cinfo)
817804
{
818805
my_dest_ptr dest = (my_dest_ptr) cinfo->dest;
819806

0 commit comments

Comments
 (0)