From be3b3a04b6d43a99fed32d7b55f2742f5840d8cd Mon Sep 17 00:00:00 2001 From: NeGate Date: Mon, 6 Jun 2022 17:41:20 -0400 Subject: [PATCH] included stdarg.h --- build_cuik.cmd | 12 ++++++++++++ inc/_platform.h | 15 ++++++++------- inc/assert.h | 1 - 3 files changed, 20 insertions(+), 8 deletions(-) create mode 100644 build_cuik.cmd diff --git a/build_cuik.cmd b/build_cuik.cmd new file mode 100644 index 0000000..7ac578f --- /dev/null +++ b/build_cuik.cmd @@ -0,0 +1,12 @@ +@echo off +setlocal enabledelayedexpansion + +set PLATFORM=win32 +set CIABATTA_OPTIONS=--crt none -I %% -I inc + +del ciabatta.lib +cuik %CIABATTA_OPTIONS% code\*.c platform\%PLATFORM%\*.c -c -o ciabatta.obj +lib /out:ciabatta.lib ciabatta.obj + +cuik test\test.c --lib ciabatta.lib,kernel32.lib,user32.lib,shell32.lib %CIABATTA_OPTIONS% +del ciabatta.obj diff --git a/inc/_platform.h b/inc/_platform.h index a0742a0..78a67f1 100644 --- a/inc/_platform.h +++ b/inc/_platform.h @@ -1,10 +1,11 @@ #pragma once #include #include +#include // 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 + #define __STDC_WANT_LIB_EXT1__ 1 #endif // Compiler Identification @@ -26,9 +27,9 @@ #endif #if !(defined(_compiler_msvc) \ - || defined(_compiler_gnu) \ - || defined(_compiler_cuik) \ - || defined(_compiler_clang)) + || defined(_compiler_gnu) \ + || defined(_compiler_cuik) \ + || defined(_compiler_clang)) #error "Unsupported Compiler" #endif @@ -43,12 +44,12 @@ #endif #if !(defined(_os_win) \ - || defined(_os_linux)) + || defined(_os_linux)) #error "Unsupported OS" #endif #ifdef __STDC_WANT_LIB_EXT1__ - typedef int errno_t; - typedef size_t rsize_t; + typedef int errno_t; + typedef size_t rsize_t; #endif diff --git a/inc/assert.h b/inc/assert.h index 119d665..c00bb14 100644 --- a/inc/assert.h +++ b/inc/assert.h @@ -1,5 +1,4 @@ #pragma once - #include "_macros.h" extern void _assert_error(char *cond, char const *func, char const *file, char const *line);