diff --git a/LibC/stddef.h b/LibC/stddef.h index 2e0601bee9..61a20c763a 100644 --- a/LibC/stddef.h +++ b/LibC/stddef.h @@ -2,3 +2,12 @@ #include #include + +#ifdef __cplusplus +#define NULL nullptr +#else +#define NULL ((void*)0) +#endif + +typedef __PTRDIFF_TYPE__ ptrdiff_t; +typedef __SIZE_TYPE__ size_t; diff --git a/LibC/sys/types.h b/LibC/sys/types.h index dc55ad488e..9f806759dc 100644 --- a/LibC/sys/types.h +++ b/LibC/sys/types.h @@ -1,7 +1,8 @@ #pragma once -#include +#include #include +#include __BEGIN_DECLS @@ -14,7 +15,6 @@ typedef uint32_t gid_t; typedef int __pid_t; #define pid_t __pid_t -typedef __SIZE_TYPE__ size_t; typedef int __ssize_t; #define ssize_t __ssize_t @@ -58,11 +58,5 @@ struct utimbuf { time_t modtime; }; -#ifdef __cplusplus -#define NULL nullptr -#else -#define NULL 0 -#endif - __END_DECLS