Switch: to freestanding stdint and stdbool headers

This commit is contained in:
xamidev
2024-08-24 16:26:14 +02:00
parent 0146613ce7
commit a03bb42790
26 changed files with 31 additions and 48 deletions

View File

@@ -1,5 +1,5 @@
#include "crypto.h"
#include "../libc/stdint.h"
#include <stdint.h>
int lcg(int seed)
{

View File

@@ -3,7 +3,7 @@
#define RAND_MAX 1024
#include "../libc/stdint.h"
#include <stdint.h>
int lcg(int seed);
int randint(int seed);

View File

@@ -1,5 +1,6 @@
#include "stdint.h"
#include <stdint.h>
#include <stdbool.h>
bool isdigit(char c)
{

View File

@@ -1,7 +1,7 @@
#ifndef CTYPE_H
#define CTYPE_H
#include "stdint.h"
#include <stdbool.h>
bool isdigit(char c);
bool isspace(char c);

View File

@@ -1,24 +0,0 @@
#ifndef INCLUDE_STDINT_H
#define INCLUDE_STDINT_H
typedef signed char int8_t;
typedef unsigned char uint8_t;
typedef signed short int16_t;
typedef unsigned short uint16_t;
typedef signed long int int32_t;
typedef unsigned long int uint32_t;
typedef signed long long int int64_t;
typedef unsigned long long int uint64_t;
typedef uint8_t bool;
#define true 1
#define false 0
#define NULL ((void*)0)
typedef unsigned int uintptr_t;
#endif

View File

@@ -1,7 +1,7 @@
#include "../kernel/io.h"
#include "stdio.h"
#include "string.h"
#include "stdint.h"
#include <stdint.h>
#include "../kernel/system.h"
#include "../drivers/framebuffer.h"
#include "../drivers/serial.h"

View File

@@ -1,7 +1,8 @@
#ifndef INCLUDE_STDIO_H
#define INCLUDE_STDIO_H
#include "stdint.h"
#include <stdint.h>
#include <stdbool.h>
#define FB_GREEN 2
#define FB_DARK_GREY 8

View File

@@ -1,4 +1,5 @@
#include "stdint.h"
#include <stdint.h>
#include "../kernel/system.h"
int strlen(const char* str)
{