summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2012-12-21 16:13:24 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2012-12-21 16:13:24 -0800
commit2293b51c64b75d3b6cdbdc4d0f5d790ef89ec55f (patch)
tree1cbaa91144ab71a2cfd0873a35573224f07561b0
parent26d1e005e5b728f8ffac5165e1358c8379090c55 (diff)
parent9a204c557fd0ba86e666b6d47c2b29b7894d76ba (diff)
am 9a204c55: Merge "Remove duplicated definitions of size_t and ssize_t"
* commit '9a204c557fd0ba86e666b6d47c2b29b7894d76ba': Remove duplicated definitions of size_t and ssize_t
-rw-r--r--ndk/platforms/android-3/arch-arm/include/machine/_types.h11
-rw-r--r--ndk/platforms/android-3/include/stdint.h6
-rw-r--r--ndk/platforms/android-3/include/stdio.h25
-rw-r--r--ndk/platforms/android-3/include/sys/types.h6
-rw-r--r--ndk/platforms/android-8/include/stdio.h25
-rw-r--r--ndk/platforms/android-9/arch-mips/include/machine/_types.h2
-rw-r--r--ndk/platforms/android-9/arch-x86/include/machine/_types.h23
7 files changed, 4 insertions, 94 deletions
diff --git a/ndk/platforms/android-3/arch-arm/include/machine/_types.h b/ndk/platforms/android-3/arch-arm/include/machine/_types.h
index dbc4e9d74..1521a4c6c 100644
--- a/ndk/platforms/android-3/arch-arm/include/machine/_types.h
+++ b/ndk/platforms/android-3/arch-arm/include/machine/_types.h
@@ -35,17 +35,6 @@
#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;
diff --git a/ndk/platforms/android-3/include/stdint.h b/ndk/platforms/android-3/include/stdint.h
index 49879cb5b..c3e29dde7 100644
--- a/ndk/platforms/android-3/include/stdint.h
+++ b/ndk/platforms/android-3/include/stdint.h
@@ -226,12 +226,6 @@ typedef int64_t intmax_t;
# 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... */
diff --git a/ndk/platforms/android-3/include/stdio.h b/ndk/platforms/android-3/include/stdio.h
index 273f63030..a56faa2f3 100644
--- a/ndk/platforms/android-3/include/stdio.h
+++ b/ndk/platforms/android-3/include/stdio.h
@@ -39,7 +39,7 @@
#define _STDIO_H_
#include <sys/cdefs.h>
-#include <sys/_types.h>
+#include <sys/types.h>
/* va_list and size_t must be defined by stdio.h according to Posix */
#define __need___va_list
@@ -49,30 +49,9 @@
#define __need_size_t
#include <stddef.h>
+#define __need_NULL
#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;
-#endif
-
-#ifndef _OFF_T_DEFINED_
-#define _OFF_T_DEFINED_
-typedef long off_t;
-#endif
-
-#ifndef NULL
-#ifdef __GNUG__
-#define NULL __null
-#else
-#define NULL 0L
-#endif
-#endif
-
#define _FSTDIO /* Define for new stdio with functions. */
typedef off_t fpos_t; /* stdio file position type */
diff --git a/ndk/platforms/android-3/include/sys/types.h b/ndk/platforms/android-3/include/sys/types.h
index 33fe30e55..15ecb373a 100644
--- a/ndk/platforms/android-3/include/sys/types.h
+++ b/ndk/platforms/android-3/include/sys/types.h
@@ -85,12 +85,6 @@ typedef .... pthread_rwlock_attr_t;
typedef .... pthread_t;
#endif
-#ifndef _SIZE_T_DEFINED_
-#define _SIZE_T_DEFINED_
-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/ndk/platforms/android-8/include/stdio.h b/ndk/platforms/android-8/include/stdio.h
index c38ed5a51..172c8d0dc 100644
--- a/ndk/platforms/android-8/include/stdio.h
+++ b/ndk/platforms/android-8/include/stdio.h
@@ -39,7 +39,7 @@
#define _STDIO_H_
#include <sys/cdefs.h>
-#include <sys/_types.h>
+#include <sys/types.h>
/* va_list and size_t must be defined by stdio.h according to Posix */
#define __need___va_list
@@ -49,30 +49,9 @@
#define __need_size_t
#include <stddef.h>
+#define __need_NULL
#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;
-#endif
-
-#ifndef _OFF_T_DEFINED_
-#define _OFF_T_DEFINED_
-typedef long off_t;
-#endif
-
-#ifndef NULL
-#ifdef __GNUG__
-#define NULL __null
-#else
-#define NULL 0L
-#endif
-#endif
-
#define _FSTDIO /* Define for new stdio with functions. */
typedef off_t fpos_t; /* stdio file position type */
diff --git a/ndk/platforms/android-9/arch-mips/include/machine/_types.h b/ndk/platforms/android-9/arch-mips/include/machine/_types.h
index 52ccdffb4..05f79ef67 100644
--- a/ndk/platforms/android-9/arch-mips/include/machine/_types.h
+++ b/ndk/platforms/android-9/arch-mips/include/machine/_types.h
@@ -105,8 +105,6 @@ typedef double __double_t;
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
diff --git a/ndk/platforms/android-9/arch-x86/include/machine/_types.h b/ndk/platforms/android-9/arch-x86/include/machine/_types.h
index d3d9eeb6a..d21782284 100644
--- a/ndk/platforms/android-9/arch-x86/include/machine/_types.h
+++ b/ndk/platforms/android-9/arch-x86/include/machine/_types.h
@@ -35,29 +35,6 @@
#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;