mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 23:07:35 +00:00
LibC: A bunch of compat work towards porting GCC.
This commit is contained in:
parent
9fd4f4862b
commit
93c0dfd1d7
18 changed files with 166 additions and 13 deletions
|
@ -18,6 +18,6 @@
|
|||
#define offsetof(type, member) __builtin_offsetof(type, member)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" int main(int, char**);
|
||||
//extern "C" int main(int, char**);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -7,18 +7,18 @@ __BEGIN_DECLS
|
|||
|
||||
typedef unsigned int u_int;
|
||||
typedef unsigned long u_long;
|
||||
typedef __PTRDIFF_TYPE__ ptrdiff_t;
|
||||
typedef unsigned long int __uintmax_t;
|
||||
typedef __uintmax_t uintmax_t;
|
||||
typedef long int __intmax_t;
|
||||
typedef __intmax_t intmax_t;
|
||||
|
||||
typedef uint32_t uid_t;
|
||||
typedef uint32_t gid_t;
|
||||
typedef int16_t pid_t;
|
||||
|
||||
typedef int __pid_t;
|
||||
#define pid_t __pid_t
|
||||
|
||||
typedef __SIZE_TYPE__ size_t;
|
||||
typedef int32_t ssize_t;
|
||||
typedef int __ssize_t;
|
||||
#define ssize_t __ssize_t
|
||||
|
||||
typedef __WINT_TYPE__ wint_t;
|
||||
|
||||
typedef uint32_t ino_t;
|
||||
typedef int32_t off_t;
|
||||
|
|
12
LibC/sys/wait.cpp
Normal file
12
LibC/sys/wait.cpp
Normal file
|
@ -0,0 +1,12 @@
|
|||
#include <sys/wait.h>
|
||||
#include <assert.h>
|
||||
|
||||
extern "C" {
|
||||
|
||||
pid_t wait(int* wstatus)
|
||||
{
|
||||
(void)wstatus;
|
||||
assert(false);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
#pragma once
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
pid_t wait(int* wstatus);
|
||||
|
||||
__END_DECLS
|
Loading…
Add table
Add a link
Reference in a new issue