From 2260b66e1671038a362dca4a204c28d72b8f7e4e Mon Sep 17 00:00:00 2001 From: DRC Date: Fri, 31 Aug 2018 12:55:33 -0500 Subject: [PATCH] jconfig.h: restore Autotools compatibility (regression introduced with the CMake-based Un*x build system) Refer to change log for more details. Based on: https://github.com/libjpeg-turbo/libjpeg-turbo/pull/275/commits/d992d12bc7631c29ab4adc42a7c5b4273fe2d56e Closes #275 --- ChangeLog.md | 12 ++++++++++++ jconfig.h.in | 28 ++++++++++++++-------------- 2 files changed, 26 insertions(+), 14 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 8f0d11b1a..d3bb53f14 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,3 +1,15 @@ +2.0.1 +===== + +### Significant changes relative to 2.0.0: + +1. Fixed a regression introduced with the new CMake-based Un*x build system, +whereby jconfig.h could cause compiler warnings of the form +`"HAVE_*_H" redefined` if it was included by downstream Autotools-based +projects that used `AC_CHECK_HEADERS()` to check for the existence of locale.h, +stddef.h, or stdlib.h. + + 2.0.0 ===== diff --git a/jconfig.h.in b/jconfig.h.in index 28427548e..18a69a481 100644 --- a/jconfig.h.in +++ b/jconfig.h.in @@ -10,16 +10,16 @@ #define LIBJPEG_TURBO_VERSION_NUMBER @LIBJPEG_TURBO_VERSION_NUMBER@ /* Support arithmetic encoding */ -#cmakedefine C_ARITH_CODING_SUPPORTED +#cmakedefine C_ARITH_CODING_SUPPORTED 1 /* Support arithmetic decoding */ -#cmakedefine D_ARITH_CODING_SUPPORTED +#cmakedefine D_ARITH_CODING_SUPPORTED 1 /* Support in-memory source/destination managers */ -#cmakedefine MEM_SRCDST_SUPPORTED +#cmakedefine MEM_SRCDST_SUPPORTED 1 /* Use accelerated SIMD routines. */ -#cmakedefine WITH_SIMD +#cmakedefine WITH_SIMD 1 /* * Define BITS_IN_JSAMPLE as either @@ -33,37 +33,37 @@ #define BITS_IN_JSAMPLE @BITS_IN_JSAMPLE@ /* use 8 or 12 */ /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_LOCALE_H +#cmakedefine HAVE_LOCALE_H 1 /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STDDEF_H +#cmakedefine HAVE_STDDEF_H 1 /* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STDLIB_H +#cmakedefine HAVE_STDLIB_H 1 /* Define if you need to include to get size_t. */ -#cmakedefine NEED_SYS_TYPES_H +#cmakedefine NEED_SYS_TYPES_H 1 /* Define if you have BSD-like bzero and bcopy in rather than memset/memcpy in . */ -#cmakedefine NEED_BSD_STRINGS +#cmakedefine NEED_BSD_STRINGS 1 /* Define to 1 if the system has the type `unsigned char'. */ -#cmakedefine HAVE_UNSIGNED_CHAR +#cmakedefine HAVE_UNSIGNED_CHAR 1 /* Define to 1 if the system has the type `unsigned short'. */ -#cmakedefine HAVE_UNSIGNED_SHORT +#cmakedefine HAVE_UNSIGNED_SHORT 1 /* Compiler does not support pointers to undefined structures. */ -#cmakedefine INCOMPLETE_TYPES_BROKEN +#cmakedefine INCOMPLETE_TYPES_BROKEN 1 /* Define if your (broken) compiler shifts signed values as if they were unsigned. */ -#cmakedefine RIGHT_SHIFT_IS_UNSIGNED +#cmakedefine RIGHT_SHIFT_IS_UNSIGNED 1 /* Define to 1 if type `char' is unsigned and you are not using gcc. */ #ifndef __CHAR_UNSIGNED__ - #cmakedefine __CHAR_UNSIGNED__ + #cmakedefine __CHAR_UNSIGNED__ 1 #endif /* Define to empty if `const' does not conform to ANSI C. */