You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ko...@apache.org on 2017/07/14 11:11:14 UTC
svn commit: r1801939 - /subversion/trunk/subversion/libsvn_subr/lz4/lz4.c
Author: kotkov
Date: Fri Jul 14 11:11:14 2017
New Revision: 1801939
URL: http://svn.apache.org/viewvc?rev=1801939&view=rev
Log:
Apply a minor patch to the LZ4 code that allows building with --std=c89.
Apparently, the definition of the FORCE_INLINE macro in lz4.c has
been broken in https://github.com/lz4/lz4/commit/258a5e7fa4482548
In its current shape the macro uses the C99 'inline' keyword even when
compiling in C89 or C90 modes.
* subversion/libsvn_subr/lz4/lz4.c
(FORCE_INLINE): Revert this macro to its state before 258a5e7fa4482548.
Modified:
subversion/trunk/subversion/libsvn_subr/lz4/lz4.c
Modified: subversion/trunk/subversion/libsvn_subr/lz4/lz4.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/lz4/lz4.c?rev=1801939&r1=1801938&r2=1801939&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/lz4/lz4.c (original)
+++ subversion/trunk/subversion/libsvn_subr/lz4/lz4.c Fri Jul 14 11:11:14 2017
@@ -96,19 +96,21 @@
/*-************************************
* Compiler Options
**************************************/
-#ifdef _MSC_VER /* Visual Studio */
-# define FORCE_INLINE static __forceinline
-# include <intrin.h>
-# pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */
-# pragma warning(disable : 4293) /* disable: C4293: too large shift (32-bits) */
-#else
-# if defined(__GNUC__) || defined(__clang__)
-# define FORCE_INLINE static inline __attribute__((always_inline))
-# elif defined(__cplusplus) || (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */)
-# define FORCE_INLINE static inline
-# else
-# define FORCE_INLINE static
-# endif
+#ifdef _MSC_VER /* Visual Studio */
+# define FORCE_INLINE static __forceinline
+# include <intrin.h>
+# pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */
+# pragma warning(disable : 4293) /* disable: C4293: too large shift (32-bits) */
+#else
+# if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */
+# if defined(__GNUC__) || defined(__clang__)
+# define FORCE_INLINE static inline __attribute__((always_inline))
+# else
+# define FORCE_INLINE static inline
+# endif
+# else
+# define FORCE_INLINE static
+# endif /* __STDC_VERSION__ */
#endif /* _MSC_VER */
#if (defined(__GNUC__) && (__GNUC__ >= 3)) || (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 800)) || defined(__clang__)