ciabatta/inc/_platform.h

54 lines
994 B
C
Raw Normal View History

2022-06-02 06:28:17 +00:00
#pragma once
#include <stddef.h>
#include <stdint.h>
// Microsoft uses this to refer to the secure functions so we'll allow it
#ifdef __STDC_WANT_SECURE_LIB__
#define __STDC_WANT_LIB_EXT1__ 1
#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) \
|| defined(_compiler_gnu) \
2022-06-02 06:28:17 +00:00
|| defined(_compiler_cuik) \
2022-06-02 05:18:26 +00:00
|| defined(_compiler_clang))
#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) \
|| defined(_os_linux))
#error "Unsupported OS"
#endif
2022-06-02 06:28:17 +00:00
#ifdef __STDC_WANT_LIB_EXT1__
typedef int errno_t;
typedef size_t rsize_t;
2022-06-02 23:41:48 +00:00
#endif