From 786a0cc6a33681bf4b581d0abcd091989d2877fa Mon Sep 17 00:00:00 2001 From: terminx Date: Sun, 18 Nov 2018 18:05:20 +0000 Subject: [PATCH] Rename the implementation of _lrotl() found at the top of kplib.cpp to klrotl() and use it unconditionally on platforms other than Win32 (it's only used in .bmp rendering). git-svn-id: https://svn.eduke32.com/eduke32@7145 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/build/src/kplib.cpp | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/source/build/src/kplib.cpp b/source/build/src/kplib.cpp index 5340d1d56..6fdc70aa4 100644 --- a/source/build/src/kplib.cpp +++ b/source/build/src/kplib.cpp @@ -35,22 +35,23 @@ credits. #include "pragmas.h" #if !defined(_WIN32) -#include -static inline int32_t _lrotl(int32_t i, int sh) { return (i >> (-sh)) | (i << sh); } +# include +static FORCE_INLINE CONSTEXPR int32_t klrotl(int32_t i, int sh) { return (i >> (-sh)) | (i << sh); } /*inline*/ int32_t filelength(int h) { struct stat st; if (fstat(h,&st) < 0) return -1; return st.st_size; } -#define _fileno fileno +# define _fileno fileno #else -#include -#ifdef __clang__ -#include -#else -#include -#endif +# define klrotl(i, sh) _lrotl(i, sh) +# include +# ifdef __clang__ +# include +# else +# include +# endif #endif //use GCC-specific extension to force symbol name to be something in particular to override underscoring. @@ -1980,17 +1981,17 @@ static int32_t kbmprend(const char *buf, int32_t fleng, case 16: for (x=x0; x