mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-15 02:40:38 +00:00
LibC: Move size_t, ptrdiff_t and NULL to stddef.h. #POSIX
This commit is contained in:
parent
cbd858544d
commit
ab9db3a717
Notes:
sideshowbarker
2024-07-19 13:52:20 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/ab9db3a717f
2 changed files with 11 additions and 8 deletions
|
@ -2,3 +2,12 @@
|
|||
|
||||
#include <sys/cdefs.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define NULL nullptr
|
||||
#else
|
||||
#define NULL ((void*)0)
|
||||
#endif
|
||||
|
||||
typedef __PTRDIFF_TYPE__ ptrdiff_t;
|
||||
typedef __SIZE_TYPE__ size_t;
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
__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
|
||||
|
||||
|
|
Loading…
Reference in a new issue