2022-06-02 06:28:17 +00:00
|
|
|
#pragma once
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <stdint.h>
|
2022-06-06 21:41:20 +00:00
|
|
|
#include <stdarg.h>
|
2022-06-02 06:28:17 +00:00
|
|
|
|
|
|
|
// Microsoft uses this to refer to the secure functions so we'll allow it
|
|
|
|
#ifdef __STDC_WANT_SECURE_LIB__
|
2022-06-06 21:41:20 +00:00
|
|
|
#define __STDC_WANT_LIB_EXT1__ 1
|
2022-06-02 06:28:17 +00:00
|
|
|
#endif
|
|
|
|
|
2022-06-02 05:18:26 +00:00
|
|
|
// Compiler Identification
|
|
|
|
|
|
|
|
#if defined(_MSC_VER) && !defined(__clang__)
|
|
|
|
#define _compiler_msvc
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(__GNUC__) && !defined(__clang__)
|
|
|
|
#define _compiler_gnu
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(__clang__)
|
|
|
|
#define _compiler_clang
|
|
|
|
#endif
|
|
|
|
|
2022-06-02 06:28:17 +00:00
|
|
|
#if defined(__CUIKC__)
|
|
|
|
#define _compiler_cuik
|
|
|
|
#endif
|
|
|
|
|
2022-06-02 05:18:26 +00:00
|
|
|
#if !(defined(_compiler_msvc) \
|
2022-06-06 21:41:20 +00:00
|
|
|
|| defined(_compiler_gnu) \
|
|
|
|
|| defined(_compiler_cuik) \
|
|
|
|
|| defined(_compiler_clang))
|
2022-06-02 05:18:26 +00:00
|
|
|
#error "Unsupported Compiler"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// OS Identification
|
|
|
|
|
|
|
|
#if defined(_WIN32)
|
|
|
|
#define _os_win
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(__linux__) && !defined(__ANDROID__)
|
|
|
|
#define _os_linux
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if !(defined(_os_win) \
|
2022-06-06 21:41:20 +00:00
|
|
|
|| defined(_os_linux))
|
2022-06-02 05:18:26 +00:00
|
|
|
#error "Unsupported OS"
|
|
|
|
#endif
|
|
|
|
|
2022-06-02 06:28:17 +00:00
|
|
|
#ifdef __STDC_WANT_LIB_EXT1__
|
2022-06-06 21:41:20 +00:00
|
|
|
typedef int errno_t;
|
|
|
|
typedef size_t rsize_t;
|
2022-06-02 23:41:48 +00:00
|
|
|
#endif
|
2022-06-03 09:31:16 +00:00
|
|
|
|