Only use jpeg's TRUE and FALSE values when using its boolean type. https://github.com/DentonW/DevIL/pull/89 --- src-IL/src/il_jpeg.cpp.orig 2017-01-01 18:03:56.000000000 -0600 +++ src-IL/src/il_jpeg.cpp 2020-07-05 10:34:52.000000000 -0500 @@ -245,7 +245,7 @@ src->buffer[0] = (JOCTET) 0xFF; src->buffer[1] = (JOCTET) JPEG_EOI; nbytes = 2; - return IL_FALSE; + return FALSE; } if (nbytes < INPUT_BUF_SIZE) { ilGetError(); // Gets rid of the IL_FILE_READ_ERROR. @@ -253,9 +253,9 @@ src->pub.next_input_byte = src->buffer; src->pub.bytes_in_buffer = nbytes; - src->start_of_file = IL_FALSE; + src->start_of_file = FALSE; - return IL_TRUE; + return TRUE; } @@ -334,13 +334,13 @@ if ((result = setjmp(JpegJumpBuffer) == 0) != IL_FALSE) { jpeg_create_decompress(&JpegInfo); - JpegInfo.do_block_smoothing = IL_TRUE; - JpegInfo.do_fancy_upsampling = IL_TRUE; + JpegInfo.do_block_smoothing = TRUE; + JpegInfo.do_fancy_upsampling = TRUE; //jpeg_stdio_src(&JpegInfo, iGetFile()); devil_jpeg_read_init(&JpegInfo); - jpeg_read_header(&JpegInfo, IL_TRUE); + jpeg_read_header(&JpegInfo, TRUE); result = ilLoadFromJpegStruct(&JpegInfo); @@ -391,7 +391,7 @@ iwrite(dest->buffer, 1, OUTPUT_BUF_SIZE); dest->pub.next_output_byte = dest->buffer; dest->pub.free_in_buffer = OUTPUT_BUF_SIZE; - return IL_TRUE; + return TRUE; } METHODDEF(void) @@ -554,12 +554,12 @@ //#endif//IL_USE_JPEGLIB_UNMODIFIED // Set the quality output - jpeg_set_quality(&JpegInfo, iGetInt(IL_JPG_QUALITY), IL_TRUE); + jpeg_set_quality(&JpegInfo, iGetInt(IL_JPG_QUALITY), TRUE); // Sets progressive saving here if (ilGetBoolean(IL_JPG_PROGRESSIVE)) jpeg_simple_progression(&JpegInfo); - jpeg_start_compress(&JpegInfo, IL_TRUE); + jpeg_start_compress(&JpegInfo, TRUE); //row_stride = image_width * 3; // JSAMPLEs per row in image_buffer @@ -970,7 +970,7 @@ JpegInfo->image_height = TempImage->Height; JpegInfo->input_components = TempImage->Bpp; // # of color components per pixel - jpeg_start_compress(JpegInfo, IL_TRUE); + jpeg_start_compress(JpegInfo, TRUE); //row_stride = image_width * 3; // JSAMPLEs per row in image_buffer