From 1f11e8fba7ac12457b4f67ec43597562a1732b7c Mon Sep 17 00:00:00 2001 From: Ladislav Zezula Date: Mon, 21 Dec 2020 09:24:54 +0100 Subject: _countof macro should now work for all builds --- src/StormPort.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/StormPort.h') diff --git a/src/StormPort.h b/src/StormPort.h index 6773975..ee00db8 100644 --- a/src/StormPort.h +++ b/src/StormPort.h @@ -197,10 +197,6 @@ #define MAX_PATH 1024 #endif - #ifndef _countof - #define _countof(x) (sizeof(x) / sizeof(x[0])) - #endif - #define WINAPI #define FILE_BEGIN SEEK_SET @@ -257,6 +253,10 @@ #define ERROR_FILE_CORRUPT 1004 // No such error code under Linux #endif +#ifndef _countof + #define _countof(x) (sizeof(x) / sizeof(x[0])) +#endif + //----------------------------------------------------------------------------- // Swapping functions -- cgit v1.2.3