LibC: Add some new functions
This commit is contained in:
@@ -15,8 +15,8 @@ LIBDIR?=$(EXEC_PREFIX)/lib
|
||||
|
||||
CFLAGS:=$(CFLAGS) -D__is_libc -Iinclude -ffreestanding -Wall -Wextra
|
||||
CPPFLAGS:=$(CPPFLAGS)
|
||||
LIBK_CFLAGS:=$(CFLAGS)
|
||||
LIBK_CPPFLAGS:=$(CPPFLAGS) -D__is_libk
|
||||
LIBK_CFLAGS:=$(CFLAGS) -D__is_libk
|
||||
LIBK_CPPFLAGS:=$(CPPFLAGS)
|
||||
|
||||
ARCHDIR=arch/$(HOSTARCH)
|
||||
|
||||
|
||||
5
libc/include/assert.h
Normal file
5
libc/include/assert.h
Normal file
@@ -0,0 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#define assert(expr) { if (!(expr)) abort(); }
|
||||
4
libc/include/sys/param.h
Normal file
4
libc/include/sys/param.h
Normal file
@@ -0,0 +1,4 @@
|
||||
#pragma once
|
||||
|
||||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
#define MAX(a, b) ((a) > (b) ? (a) : (b))
|
||||
Reference in New Issue
Block a user