diff --git a/src/util/compat.h b/src/util/compat.h index b4f0651..2ba9b79 100644 --- a/src/util/compat.h +++ b/src/util/compat.h @@ -12,10 +12,14 @@ # define PATH_SEP '\\' // contains the path separator as a character. Yes it is extremely annoying that this has to exist. # define PATH_SEP_STR "\\" // contains the path separator as a string, useful for concatenation. Yes it is extremely annoying that this has to exist. +# define unixonly(_exec) // (no-op) executes inline code when __unix__ is defined, otherwise is no-op +# define winonly(_exec) _exec // executes inline code when _WIN32 is defined, otherwise is no-op #else # define PATH_SEP '/' // contains the path separator as a character. Yes it is extremely annoying that this has to exist. # define PATH_SEP_STR "/" // contains the path separator as a string, useful for concatenation. Yes it is extremely annoying that this has to exist. +# define unixonly(_exec) _exec // executes inline code when __unix__ is defined, otherwise is no-op +# define winonly(_exec) // (no-op) executes inline code when _WIN32 is defined, otherwise is no-op #endif // define the constants if they haven't been