From 66ea2f09dffa00e96a08d61e108ecd016cfdc8f9 Mon Sep 17 00:00:00 2001 From: NeGate Date: Tue, 7 Jun 2022 21:46:36 -0400 Subject: [PATCH] Changed some includes --- build_cuik.cmd | 4 ++-- inc/_compiler.h | 10 ++-------- inc/stdio.h | 2 +- inc/stdlib.h | 7 ++----- 4 files changed, 7 insertions(+), 16 deletions(-) diff --git a/build_cuik.cmd b/build_cuik.cmd index 7ac578f..6d6560c 100644 --- a/build_cuik.cmd +++ b/build_cuik.cmd @@ -1,11 +1,11 @@ @echo off setlocal enabledelayedexpansion -set PLATFORM=win32 +set PLATFORM=win set CIABATTA_OPTIONS=--crt none -I %% -I inc del ciabatta.lib -cuik %CIABATTA_OPTIONS% code\*.c platform\%PLATFORM%\*.c -c -o ciabatta.obj +cuik %CIABATTA_OPTIONS% code\*.c code\os\%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% diff --git a/inc/_compiler.h b/inc/_compiler.h index 41c74f3..35408bf 100644 --- a/inc/_compiler.h +++ b/inc/_compiler.h @@ -24,7 +24,7 @@ #error "Unsupported Compiler" #endif -#if defined(_compiler_msvc) +#if defined(_compiler_msvc) || defined(_compiler_cuik) #include #define _compiler_brk __debugbreak #elif defined(_compiler_gcc) || defined(_compiler_clang) @@ -33,10 +33,4 @@ #error "_compiler_brk is not implemented for this compiler" #endif -#if defined(_compiler_msvc) - #define _compiler_curfunc __FUNCTION__ -#elif defined(_compiler_gcc) || defined(_compiler_clang) - #define _compiler_curfunc __func__ -#else - #error "_compiler_curfunc not implemented for this compiler" -#endif +#define _compiler_curfunc __FUNCTION__ diff --git a/inc/stdio.h b/inc/stdio.h index b2f59a9..315d4ba 100644 --- a/inc/stdio.h +++ b/inc/stdio.h @@ -1,7 +1,7 @@ - #pragma once #include +#include typedef struct FILE FILE; typedef int64_t fpos_t; diff --git a/inc/stdlib.h b/inc/stdlib.h index 3ca5496..358f0a1 100644 --- a/inc/stdlib.h +++ b/inc/stdlib.h @@ -1,9 +1,6 @@ - #pragma once - -#if !defined(NULL) - #define NULL ((void *)0) -#endif +// Defines NULL +#include #if !defined(__STDC_LIB_EXT1__) #define __STDC_LIB_EXT1__