summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libc/include/stdio.h13
-rw-r--r--libc/include/stdlib.h10
-rw-r--r--libc/include/sys/types.h5
-rw-r--r--libc/include/wchar.h7
4 files changed, 7 insertions, 28 deletions
diff --git a/libc/include/stdio.h b/libc/include/stdio.h
index ca78092..d7c881c 100644
--- a/libc/include/stdio.h
+++ b/libc/include/stdio.h
@@ -41,23 +41,16 @@
#include <sys/cdefs.h>
#include <sys/_types.h>
-/* va_list and size_t must be defined by stdio.h according to Posix */
-#define __need___va_list
#include <stdarg.h>
-
-/* note that this forces stddef.h to *only* define size_t */
-#define __need_size_t
-#include <stddef.h>
-
#include <stddef.h>
#if __BSD_VISIBLE || __POSIX_VISIBLE || __XPG_VISIBLE
#include <sys/types.h> /* XXX should be removed */
#endif
-#ifndef _SIZE_T_DEFINED_
-#define _SIZE_T_DEFINED_
-typedef unsigned long size_t;
+#ifndef _SIZE_T_DEFINED_
+#define _SIZE_T_DEFINED_
+typedef unsigned int size_t;
#endif
#ifndef _SSIZE_T_DEFINED_
diff --git a/libc/include/stdlib.h b/libc/include/stdlib.h
index 9c0e556..e728cb6 100644
--- a/libc/include/stdlib.h
+++ b/libc/include/stdlib.h
@@ -30,12 +30,6 @@
#include <sys/cdefs.h>
-/* wchar_t is required in stdlib.h according to POSIX.
- * note that defining __need_wchar_t prevents stddef.h
- * to define all other symbols it does normally */
-#define __need_wchar_t
-#include <stddef.h>
-
#include <stddef.h>
#include <string.h>
#include <alloca.h>
@@ -58,8 +52,8 @@ extern int unsetenv(const char *);
extern int clearenv(void);
extern char *mkdtemp(char *);
-extern char *mktemp (char *);
-extern int mkstemp (char *);
+extern char *mktemp(char *);
+extern int mkstemp(char *);
extern long strtol(const char *, char **, int);
extern long long strtoll(const char *, char **, int);
diff --git a/libc/include/sys/types.h b/libc/include/sys/types.h
index 33fe30e..77b3223 100644
--- a/libc/include/sys/types.h
+++ b/libc/include/sys/types.h
@@ -28,8 +28,6 @@
#ifndef _SYS_TYPES_H_
#define _SYS_TYPES_H_
-#define __need_size_t
-#define __need_ptrdiff_t
#include <stddef.h>
#include <stdint.h>
#include <sys/cdefs.h>
@@ -45,7 +43,7 @@ typedef __u32 __kernel_dev_t;
* these are defined as 16-bit for legacy reason, but
* the kernel uses 32-bits instead.
*
- * 32-bit valuea are required for Android, so use
+ * 32-bit values are required for Android, so use
* __kernel_uid32_t and __kernel_gid32_t
*/
@@ -90,7 +88,6 @@ typedef .... pthread_t;
typedef unsigned int size_t;
#endif
-/* size_t is defined by the GCC-specific <stddef.h> */
#ifndef _SSIZE_T_DEFINED_
#define _SSIZE_T_DEFINED_
typedef long int ssize_t;
diff --git a/libc/include/wchar.h b/libc/include/wchar.h
index 1361ff5..b46985b 100644
--- a/libc/include/wchar.h
+++ b/libc/include/wchar.h
@@ -31,16 +31,11 @@
#include <sys/cdefs.h>
#include <stdio.h>
-/* wchar_t is required in stdlib.h according to POSIX */
-#define __need___wchar_t
-#include <stddef.h>
-
#include <stdarg.h>
+#include <stddef.h>
#include <time.h>
#include <malloc.h>
-#include <stddef.h>
-
/* IMPORTANT: Any code that relies on wide character support is essentially
* non-portable and/or broken. the only reason this header exist
* is because I'm really a nice guy. However, I'm not nice enough