move ciabatta headers to <cia/*>

This commit is contained in:
flysand7 2023-08-26 18:39:40 +11:00
parent deb67217b5
commit 8f739d3a10
14 changed files with 21 additions and 20 deletions

4
cia.c
View File

@ -1,5 +1,5 @@
#include <cia-def.h>
#include <cia/def.h>
// Platform-dependent sources
#include _CIA_OS_CONF
@ -8,7 +8,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <threads.h>
#include <cia-mem.h>
#include <cia/mem.h>
// Module cia_memory
#include "src/cia-mem/util.c"

View File

@ -1,7 +1,7 @@
#pragma once
#include <cia-def.h>
#include <cia/def.h>
typedef u64 Elf64_Addr;
typedef u64 Elf64_Off;

View File

@ -1,6 +0,0 @@
// This file is AUTO-GENERATED
// See os folder (e.g. src/linux) for conf.h file
#define CIA_OS_LINUX
#define CIA_DATA_LP64

6
include/cia/conf.h Normal file
View File

@ -0,0 +1,6 @@
#pragma once
#define CIA_DATA_LP64
#define CIA_OS_LINUX

View File

@ -1,9 +1,6 @@
#pragma once
// Include platform stuff
#include <cia-conf.h>
// Pre-C23 keyword macros
#define static_assert _Static_assert

View File

@ -1,7 +1,7 @@
#pragma once
#include <cia-def.h>
#include <cia/def.h>
// For now these definitions will live here
#if !defined(STDIN_FILENO)

View File

@ -1,7 +1,7 @@
#pragma once
#include <cia-def.h>
#include <cia/def.h>
typedef u64 size_t;

View File

@ -1,6 +1,8 @@
#pragma once
#include <cia/conf.h>
static_assert(sizeof(char) == 1, "Char isn't 1 bytes long");
static_assert(sizeof(short) == 2, "Short isn't 2 bytes long");
static_assert(sizeof(int) == 4, "Int isn't 4 bytes long");
@ -9,6 +11,8 @@ static_assert(sizeof(long long int) == 8, "Long long isn't 8 bytes long");
static_assert(sizeof(long) == 8, "Long on linux isn't 8 bytes");
#elif defined(CIA_DATA_LLP64)
static_assert(sizeof(long) == 4, "Long on windows isn't 4 bytes");
#else
#error "Data model not implemented"
#endif
typedef signed char int8_t;

View File

@ -1,7 +1,7 @@
#pragma once
#include <cia-def.h>
#include <cia/def.h>
#include <tinyrt.h>
typedef struct FILE FILE;

View File

@ -1,7 +1,7 @@
#pragma once
#include <cia-def.h>
#include <cia/def.h>
int atexit(void (*func)(void));
int at_quick_exit(void (*func)(void));

View File

@ -13,7 +13,7 @@
// any externally-defined functions (static functions
// are fine with gcc and clang (I think))
#include <cia-def.h>
#include <cia/def.h>
#include <bin/elf.h>
#include <sys/syscall.h>
#include <stdarg.h>

View File

@ -1,5 +1,5 @@
#include <cia-def.h>
#include <cia/def.h>
#include <bin/elf.h>
#include <sys/syscall.h>
#include <stdarg.h>
@ -12,7 +12,7 @@
#include <tinyrt.h>
#include "../os/linux/tinyrt.c"
#include <cia-mem.h>
#include <cia/mem.h>
#include "../src/cia-mem/util.c"
#include "../src/cia-mem/allocator.c"
#include "../src/cia-mem/arena.c"

View File

@ -1,5 +1,5 @@
#include <cia-def.h>
#include <cia/def.h>
#include <stdio.h>
int main(int argc, char **argv, char **envp) {