mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:07:35 +00:00
LibC: Avoid ninja-imports of system functions
This adds a new header <sys/internals.h>, which provides access to LibC internals. This is in the interest of type-checking LibC itself, as well as enabling less-hacky access for uses like LinkDemo. And, of course, this progresses LibC towards building cleanly with -Wmissing-declarations.
This commit is contained in:
parent
9221a25bbc
commit
9d2d97a059
6 changed files with 49 additions and 14 deletions
|
@ -28,16 +28,13 @@
|
|||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/internals.h>
|
||||
#include <unistd.h>
|
||||
|
||||
extern "C" {
|
||||
|
||||
int main(int, char**, char**);
|
||||
|
||||
extern void __libc_init();
|
||||
extern void _init();
|
||||
extern char** environ;
|
||||
extern bool __environ_is_malloced;
|
||||
|
||||
// Tell the compiler that this may be called from somewhere else.
|
||||
int _start(int argc, char** argv, char** env);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue