mirror of
https://github.com/thepigeongenerator/mcaselector-lite
synced 2026-02-08 07:33:35 +01:00
add compatibility headers
This commit is contained in:
13
src/util/compat/os.h
Normal file
13
src/util/compat/os.h
Normal file
@@ -0,0 +1,13 @@
|
||||
// Copyright (c) 2025 Quinn
|
||||
// Licensed under the MIT Licence. See LICENSE for details
|
||||
#pragma once
|
||||
|
||||
#if defined(__unix__)
|
||||
#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
|
||||
#elif defined(_WIN32)
|
||||
#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
|
||||
#error platform unsupported!!
|
||||
#endif
|
||||
Reference in New Issue
Block a user