Commits

Anonymous committed 07c0b73 Merge

Merge "Remove (near-)duplicate definitions of size_t and ssize_t."

Comments (0)

Files changed (7)

libc/arch-arm/include/machine/_types.h

 #ifndef _ARM__TYPES_H_
 #define _ARM__TYPES_H_
 
-
-#if !defined(__ARM_EABI__)
-/* the kernel defines size_t as unsigned int, but g++ wants it to be unsigned long */
-#define _SIZE_T
-#define _SSIZE_T
-#define _PTRDIFF_T
-typedef unsigned long  size_t;
-typedef long           ssize_t;
-typedef long           ptrdiff_t;
-#endif
-
 /* 7.18.1.1 Exact-width integer types */
 typedef	__signed char		__int8_t;
 typedef	unsigned char		__uint8_t;

libc/arch-mips/include/machine/_types.h

 typedef float			__float_t;
 typedef long long		__off_t;
 typedef long			__ptrdiff_t;
-/*typedef	unsigned long		__size_t;*/
-typedef	long			__ssize_t;
 typedef	int			__time_t;
 typedef int			__timer_t;
 #if defined(__GNUC__) && __GNUC__ >= 3

libc/arch-x86/include/machine/_types.h

 #ifndef _I386__TYPES_H_
 #define _I386__TYPES_H_
 
-/* the kernel defines size_t as unsigned int, but g++ wants it to be unsigned long */
-#ifndef _SIZE_T_DEFINED_
-#  define _SIZE_T_DEFINED_
-#  ifdef __ANDROID__
-     typedef unsigned int  size_t;
-#  else
-     typedef unsigned long  size_t;
-#  endif
-#endif
-#if !defined(_SSIZE_T) && !defined(_SSIZE_T_DEFINED_)
-#define _SSIZE_T
-#define _SSIZE_T_DEFINED_
-typedef long int       ssize_t;
-#endif
-#ifndef _PTRDIFF_T
-#define _PTRDIFF_T
-#  ifdef __ANDROID__
-     typedef int            ptrdiff_t;
-#  else
-     typedef long           ptrdiff_t;
-#  endif
-#endif
-
 /* 7.18.1.1 Exact-width integer types */
 typedef	__signed char		__int8_t;
 typedef	unsigned char		__uint8_t;

libc/include/search.h

 #include <sys/cdefs.h>
 #include <sys/_types.h>
 
-#if 0
-#ifndef _SIZE_T_DECLARED
-typedef	__size_t	size_t;
-#define	_SIZE_T_DECLARED
-#endif
-#endif
-
 typedef	enum {
 	preorder,
 	postorder,

libc/include/stdint.h

 #  define UINTMAX_C(c)	UINT64_C(c)
 #endif
 
-/* size_t is defined by the GCC-specific <stddef.h> */
-#ifndef _SSIZE_T_DEFINED_
-#define _SSIZE_T_DEFINED_
-typedef long int  ssize_t;
-#endif
-
 #define _BITSIZE 32
 
 /* Keep the kernel from trying to define these types... */

libc/include/stdio.h

 #define	_STDIO_H_
 
 #include <sys/cdefs.h>
-#include <sys/_types.h>
+#include <sys/types.h>
 
 #include <stdarg.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 int  size_t;
-#endif
-
-#ifndef _SSIZE_T_DEFINED_
-#define _SSIZE_T_DEFINED_
-typedef long int  ssize_t;
-#endif
-
-#ifndef	_OFF_T_DEFINED_
-#define	_OFF_T_DEFINED_
-typedef	long    off_t;
-#endif
-
 #define __need_NULL
 #include <stddef.h>
 

libc/include/sys/types.h

 typedef  .... pthread_t;
 #endif
 
-#ifndef _SIZE_T_DEFINED_
-#define _SIZE_T_DEFINED_
-typedef unsigned int  size_t;
-#endif
-
 #ifndef _SSIZE_T_DEFINED_
 #define _SSIZE_T_DEFINED_
 typedef long int  ssize_t;