From: root Date: Thu, 11 Dec 2014 10:47:56 +0000 (+0100) Subject: Improve compatability with MSVC compiler by allowing usage of inline X-Git-Tag: 1.9.9-b1~888 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=acf1af1a809be62e4266ca2fc8cd72151f189e0f;p=thirdparty%2Fzlib-ng.git Improve compatability with MSVC compiler by allowing usage of inline --- diff --git a/zutil.h b/zutil.h index 470aab776..e6851679c 100644 --- a/zutil.h +++ b/zutil.h @@ -97,12 +97,17 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ #endif /* provide prototypes for these when building zlib without LFS */ -#if !defined(_WIN32) && \ - (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0) +#if !defined(_WIN32) && (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0) ZEXTERN uLong ZEXPORT adler32_combine64 (uLong, uLong, z_off_t); ZEXTERN uLong ZEXPORT crc32_combine64 (uLong, uLong, z_off_t); #endif +/* MS Visual Studio does not allow inline in C, only C++. + But it provides __inline instead, so use that. */ +#if defined(_MSC_VER) && !defined(inline) +# define inline __inline +#endif + /* common defaults */ #ifndef OS_CODE