Merge "Remove useless #defines and incorrect claims from header files."

This commit is contained in:
Elliott Hughes 2012-10-01 15:37:18 -07:00 committed by Gerrit Code Review
commit d3bf954e9f
4 changed files with 7 additions and 28 deletions

View file

@ -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_

View file

@ -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);

View file

@ -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;

View file

@ -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