LibC: add needed stubs to build executables with our compiler
This commit is contained in:
@@ -15,6 +15,9 @@
|
||||
#define SEEK_END 1
|
||||
#define SEEK_SET 2
|
||||
|
||||
#define EXIT_FAILURE 1
|
||||
#define EXIT_SUCCESS 0
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
struct FILE;
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
__BEGIN_DECLS
|
||||
|
||||
[[noreturn]] void abort(void);
|
||||
[[noreturn]] void exit(int);
|
||||
|
||||
int abs(int);
|
||||
|
||||
|
||||
3
libc/include/sys/syscall.h
Normal file
3
libc/include/sys/syscall.h
Normal file
@@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
#include <kernel/Syscall.h>
|
||||
@@ -6,16 +6,17 @@
|
||||
#define STDOUT_FILENO 1
|
||||
#define STDERR_FILENO 2
|
||||
|
||||
// fork(), execv(), execve(), execvp(), getpid()
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
[[noreturn]] void _exit(int);
|
||||
|
||||
pid_t fork(void);
|
||||
pid_t getpid(void);
|
||||
|
||||
int execv(const char*, char* const[]);
|
||||
int execve(const char*, char* const[], char* const[]);
|
||||
int execvp(const char*, char* const[]);
|
||||
|
||||
pid_t getpid(void);
|
||||
long syscall(long, ...);
|
||||
|
||||
__END_DECLS
|
||||
Reference in New Issue
Block a user