diff --git a/programs/util.h b/programs/util.h index 571d39421..ec8139684 100644 --- a/programs/util.h +++ b/programs/util.h @@ -11,23 +11,18 @@ #ifndef UTIL_H_MODULE #define UTIL_H_MODULE -#if defined (__cplusplus) -extern "C" { -#endif - - /*-**************************************** * Dependencies ******************************************/ #include "platform.h" /* PLATFORM_POSIX_VERSION, ZSTD_NANOSLEEP_SUPPORT, ZSTD_SETPRIORITY_SUPPORT */ #include /* size_t, ptrdiff_t */ +#include /* FILE */ #include /* stat, utime */ #include /* stat, chmod */ #include "../lib/common/mem.h" /* U64 */ - /*-************************************************************ -* Avoid fseek()'s 2GiB barrier with MSVC, macOS, *BSD, MinGW +* Fix fseek()'s 2GiB barrier with MSVC, macOS, *BSD, MinGW ***************************************************************/ #if defined(_MSC_VER) && (_MSC_VER >= 1400) # define UTIL_fseek _fseeki64 @@ -39,7 +34,6 @@ extern "C" { # define UTIL_fseek fseek #endif - /*-************************************************* * Sleep & priority functions: Windows - Posix - others ***************************************************/ @@ -88,6 +82,10 @@ extern "C" { #endif +#if defined (__cplusplus) +extern "C" { +#endif + /*-**************************************** * Console log ******************************************/