Skip to content

Commit c4617d8

Browse files
committed
Fixes #393.
Changed the jas_config.h.in header template in an attempt to avoid undesirable compiler warnings when JasPer is being used in C++ code.
1 parent 8766848 commit c4617d8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/libjasper/include/jasper/jas_config.h.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ The version of the C standard against which JasPer was built.
113113
#define JAS_DEFAULT_MAX_MEM_USAGE (1024ULL * 1024ULL * 1024ULL)
114114
#endif
115115

116-
#if (__STDC_VERSION__ - 0 < JAS_STDC_VERSION)
116+
#if (!defined(__cplusplus) && (__STDC_VERSION__ - 0 < JAS_STDC_VERSION)) || \
117+
(defined(__cplusplus) && (__cplusplus - 0 < JAS_STDC_VERSION))
117118
#warning "Your code is being built against an older version of the C standard than JasPer was. Although this is supported, this may require some extra preprocessor defines when building."
118119
#endif
119120

0 commit comments

Comments
 (0)