Fix build when CFLAGS contains -std=c89 (or -ansi)
This is a subtle point, but AC_C_INLINE defines "inline" to be either "inline", "__inline__", or "__inline". The subsequent test for "inline __attribute__((always_inline))" uses this definition. The attribute is irrespective of the inline keyword, so whereas "__inline__ __attribute__((always_inline))" works under C89, "inline __attribute__((always_inline))" doesn't, and defining INLINE to the latter causes the build to fail. The easiest way around this is simply to define "inline" ahead of "INLINE" in jconfigint.h, which causes the inline keyword detected by AC_C_INLINE to modify the INLINE macro if necessary.
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
/* libjpeg-turbo build number */
|
||||
#undef BUILD
|
||||
|
||||
/* Compiler's inline keyword */
|
||||
#undef inline
|
||||
|
||||
/* How to obtain function inlining. */
|
||||
#undef INLINE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user