Kill <machine/_types.h>.

Most of <machine/_types.h> was either unused, wrong, or identical across
all 32-/64-bit architectures.

I'm not a huge fan of <sys/_types.h> either, but moving the bits we need
up into there is a step forward.

Bug: 12213562
Change-Id: Id13551c78966e324beee2dd90c5575e37d2a71e6
diff --git a/libc/include/err.h b/libc/include/err.h
index f24da61..aad1f59 100644
--- a/libc/include/err.h
+++ b/libc/include/err.h
@@ -35,15 +35,8 @@
 #ifndef _ERR_H_
 #define	_ERR_H_
 
-/*
- * Don't use va_list in the err/warn prototypes.   Va_list is typedef'd in two
- * places (<machine/varargs.h> and <machine/stdarg.h>), so if we include one
- * of them here we may collide with the utility's includes.  It's unreasonable
- * for utilities to have to include one of them to include err.h, so we get
- * __va_list from <machine/_types.h> and use it.
- */
 #include <sys/cdefs.h>
-#include <machine/_types.h>
+#include <sys/types.h>
 
 __BEGIN_DECLS
 
diff --git a/libc/include/sys/_types.h b/libc/include/sys/_types.h
index 9d313d1..6bf9c1c 100644
--- a/libc/include/sys/_types.h
+++ b/libc/include/sys/_types.h
@@ -32,9 +32,48 @@
  */
 
 #ifndef _SYS__TYPES_H_
-#define	_SYS__TYPES_H_
+#define _SYS__TYPES_H_
 
-#include <machine/_types.h>
+typedef __signed char __int8_t;
+typedef unsigned char __uint8_t;
+typedef short __int16_t;
+typedef unsigned short __uint16_t;
+typedef int __int32_t;
+typedef unsigned int __uint32_t;
+#if __LP64__
+typedef long __int64_t;
+typedef unsigned long __uint64_t;
+#else
+typedef long long __int64_t;
+typedef unsigned long long __uint64_t;
+#endif
+
+#if __LP64__
+typedef long __intptr_t;
+typedef unsigned long __uintptr_t;
+#else
+typedef int __intptr_t;
+typedef unsigned int __uintptr_t;
+#endif
+
+#if __LP64__
+typedef long __time_t;
+#else
+typedef int __time_t; /* Historical accident. */
+#endif
+
+typedef int __timer_t;
+
+typedef int __clockid_t;
+
+#ifndef __cplusplus
+typedef int __wchar_t;
+#endif
+
+typedef double __double_t;
+typedef float __float_t;
+
+typedef __builtin_va_list __va_list;
 
 typedef	unsigned long	__cpuid_t;	/* CPU id */
 typedef	__uint32_t	__fixpt_t;	/* fixed point number */
diff --git a/libc/include/sys/endian.h b/libc/include/sys/endian.h
index b0365d8..cbde121 100644
--- a/libc/include/sys/endian.h
+++ b/libc/include/sys/endian.h
@@ -38,7 +38,6 @@
 
 #include <sys/cdefs.h>
 #include <machine/endian.h>
-#include <machine/_types.h>
 
 #define _LITTLE_ENDIAN	1234
 #define _BIG_ENDIAN	4321