headers: Drop nonstandard null.h and size_t.h.

They're holdovers from R5. <stddef.h> should just be included instead,
and ssize_t declared directly in sys/types.h.
This commit is contained in:
Augustin Cavalier
2026-05-11 14:17:55 -04:00
parent 60d0411454
commit fd09d924e6
18 changed files with 16 additions and 54 deletions
+2 -1
View File
@@ -7,7 +7,8 @@
#include <locale_t.h> #include <locale_t.h>
#include <null.h> #include <stddef.h>
struct lconv { struct lconv {
char *decimal_point; char *decimal_point;
-12
View File
@@ -1,12 +0,0 @@
/*
* Copyright 2008-2012 Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _NULL_H
#define _NULL_H
#ifndef NULL
#define NULL 0
#endif
#endif
-19
View File
@@ -1,19 +0,0 @@
/*
* Copyright 2008-2012 Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _SIZE_T_H_
#define _SIZE_T_H_
#include <stddef.h>
/* ATM we don't define ssize_t for GCC2 */
#if __GNUC__ > 2 && !defined(__ssize_t__)
# define __ssize_t__
typedef long signed int ssize_t;
#endif
#endif /* _SIZE_T_H_ */
-1
View File
@@ -7,7 +7,6 @@
#include <sys/types.h> #include <sys/types.h>
#include <null.h>
#include <stdarg.h> #include <stdarg.h>
+1 -1
View File
@@ -9,11 +9,11 @@
#include <alloca.h> #include <alloca.h>
#include <div_t.h> #include <div_t.h>
#include <limits.h> #include <limits.h>
#include <stddef.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/wait.h> #include <sys/wait.h>
#include <wchar_t.h> #include <wchar_t.h>
#define RAND_MAX 0x7fffffff #define RAND_MAX 0x7fffffff
#define MB_CUR_MAX (__ctype_get_mb_cur_max()) #define MB_CUR_MAX (__ctype_get_mb_cur_max())
+11 -8
View File
@@ -1,14 +1,14 @@
/* /*
* Copyright 2002-2012 Haiku, Inc. All Rights Reserved. * Copyright 2002-2026, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
*/ */
#ifndef _SYS_TYPES_H #ifndef _SYS_TYPES_H
#define _SYS_TYPES_H #define _SYS_TYPES_H
#include <config/types.h>
#include <BeBuild.h> #include <BeBuild.h>
#include <config/types.h>
#include <stddef.h>
/* BSD compatibility */ /* BSD compatibility */
@@ -18,13 +18,18 @@ typedef unsigned short u_short;
typedef unsigned char u_char; typedef unsigned char u_char;
/* sysV compatibility */ /* SysV compatibility */
typedef unsigned long ulong; typedef unsigned long ulong;
typedef unsigned short ushort; typedef unsigned short ushort;
typedef unsigned int uint; typedef unsigned int uint;
typedef unsigned char unchar; typedef unsigned char unchar;
#if __GNUC__ > 2 && !defined(__ssize_t__)
#define __ssize_t__
typedef long signed int ssize_t;
#endif
typedef __haiku_int64 blkcnt_t; typedef __haiku_int64 blkcnt_t;
typedef __haiku_std_int32 blksize_t; typedef __haiku_std_int32 blksize_t;
typedef __haiku_int64 fsblkcnt_t; typedef __haiku_int64 fsblkcnt_t;
@@ -43,9 +48,9 @@ typedef __haiku_std_uint32 umode_t;
typedef __haiku_std_int32 nlink_t; typedef __haiku_std_int32 nlink_t;
#ifdef __HAIKU_BEOS_COMPATIBLE_TYPES #ifdef __HAIKU_BEOS_COMPATIBLE_TYPES
typedef int daddr_t; /* disk address */ typedef int daddr_t; /* disk address */
#else #else
typedef off_t daddr_t; /* disk address */ typedef off_t daddr_t; /* disk address */
#endif #endif
typedef char* caddr_t; typedef char* caddr_t;
@@ -122,8 +127,6 @@ struct _pthread_spinlock {
}; };
#include <null.h>
#include <size_t.h>
#include <time.h> #include <time.h>
#endif #endif
-1
View File
@@ -6,7 +6,6 @@
#define _UNISTD_H_ #define _UNISTD_H_
#include <null.h>
#include <stdint.h> #include <stdint.h>
#include <sys/types.h> #include <sys/types.h>
@@ -51,7 +51,6 @@
# endif # endif
#else #else
# include <KernelExport.h> # include <KernelExport.h>
# include <null.h>
# if DEBUG_PRINT # if DEBUG_PRINT
# define __out dbg_printf # define __out dbg_printf
# define __outv dbg_vprintf # define __outv dbg_vprintf
@@ -44,7 +44,6 @@
# endif # endif
#else #else
# include <KernelExport.h> # include <KernelExport.h>
# include <null.h>
# if DEBUG_PRINT # if DEBUG_PRINT
# define __out dbg_printf # define __out dbg_printf
# else # else
@@ -42,7 +42,6 @@
#include <ctype.h> #include <ctype.h>
#include <errno.h> #include <errno.h>
#include <new> #include <new>
#include <null.h>
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
@@ -49,7 +49,6 @@
# endif # endif
#else #else
# include <KernelExport.h> # include <KernelExport.h>
# include <null.h>
# if DEBUG_PRINT # if DEBUG_PRINT
# define __out dbg_printf # define __out dbg_printf
# else # else
@@ -49,7 +49,6 @@
# endif # endif
#else #else
# include <KernelExport.h> # include <KernelExport.h>
# include <null.h>
# if DEBUG_PRINT # if DEBUG_PRINT
# define __out dbg_printf # define __out dbg_printf
# else # else
@@ -39,7 +39,6 @@ extern "C" int vsprintf(char *s, const char *format, va_list arg);
//# include <stdio.h> //# include <stdio.h>
# define __out printf # define __out printf
# else # else
//# include <null.h>
# define __out dprintf # define __out dprintf
# endif # endif
# include <stdio.h> # include <stdio.h>
@@ -35,7 +35,6 @@
# include <stdio.h> # include <stdio.h>
# define __out printf # define __out printf
# else # else
# include <null.h>
# define __out dprintf # define __out dprintf
# endif # endif
#endif #endif
@@ -51,7 +51,6 @@
# endif # endif
#else #else
# include <KernelExport.h> # include <KernelExport.h>
# include <null.h>
# if DEBUG_PRINT # if DEBUG_PRINT
# define __out dbg_printf # define __out dbg_printf
# else # else
@@ -1 +1 @@
#include <null.h> #include <stddef.h>
-1
View File
@@ -53,7 +53,6 @@
# endif # endif
#else #else
# include <KernelExport.h> # include <KernelExport.h>
# include <null.h>
# if DEBUG_PRINT # if DEBUG_PRINT
# define __out dbg_printf # define __out dbg_printf
# else # else
+1 -1
View File
@@ -6,7 +6,7 @@
#define PAGE_CACHE_LOCKER_H #define PAGE_CACHE_LOCKER_H
#include <null.h> #include <stddef.h>
struct vm_page; struct vm_page;