]> git.buserror.net Git - polintos/scott/priv.git/blob - kernel/include/kern/libc.h
Move stdio defs to stdio.h, and fix an x86 makefile bug.
[polintos/scott/priv.git] / kernel / include / kern / libc.h
1 #ifndef _KERN_LIBC_H
2 #define _KERN_LIBC_H
3
4 #include <kern/types.h>
5 #include <stdarg.h>
6 #include <string.h>
7 #include <stdio.h>
8
9 extern "C" {
10         // FIXME: template/alignof versions
11         void *memcpy(void *dest, const void *src, size_t len);
12         void *memmove(void *dest, const void *src, size_t len);
13         int memcmp(const void *b1, const void *b2, size_t len);
14         void *memset(void *b, int ch, size_t len);
15
16         void bzero(void *b, size_t len);
17         
18         void *malloc(size_t size);
19         void free(void *ptr);
20         void abort();
21 }
22
23 void run_ctors();
24
25 // Placement new operators
26
27 inline void *operator new(size_t len, void *addr)
28 {
29         return addr;
30 }
31
32 inline void *operator new[](size_t len, void *addr)
33 {
34         return addr;
35 }
36
37 #endif