Always include <sys/cdefs.h>.

I made a mistake caught by code review earlier, so let's try to be
safer by default.

This patch also moves all our "forwarding" headers to the guardless
just-include-the-other-thing style that we usually use. (Where we
have a comment explaining where the header comes from, I've kept
that.)

Change-Id: I37342cf5e2563c6a269b2ba61a697069b1c7913b
diff --git a/libc/include/alloca.h b/libc/include/alloca.h
index 0c50fc3..0508d31 100644
--- a/libc/include/alloca.h
+++ b/libc/include/alloca.h
@@ -25,9 +25,12 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  */
+
 #ifndef _ALLOCA_H
 #define _ALLOCA_H
 
+#include <sys/cdefs.h>
+
 #define alloca(size)   __builtin_alloca(size)
 
 #endif /* _ALLOCA_H */
diff --git a/libc/include/android/api-level.h b/libc/include/android/api-level.h
index b230cef..001877b 100644
--- a/libc/include/android/api-level.h
+++ b/libc/include/android/api-level.h
@@ -29,6 +29,8 @@
 #ifndef ANDROID_API_LEVEL_H
 #define ANDROID_API_LEVEL_H
 
+#include <sys/cdefs.h>
+
 /*
  * Magic version number for a current development build, which has
  * not yet turned into an official release.
diff --git a/libc/include/ar.h b/libc/include/ar.h
index 835290b..413f767 100644
--- a/libc/include/ar.h
+++ b/libc/include/ar.h
@@ -43,6 +43,8 @@
 #ifndef _AR_H_
 #define	_AR_H_
 
+#include <sys/cdefs.h>
+
 /* Pre-4BSD archives had these magic numbers in them. */
 #define	OARMAG1	0177555
 #define	OARMAG2	0177545
diff --git a/libc/include/arpa/inet.h b/libc/include/arpa/inet.h
index e4f94ef..d137130 100644
--- a/libc/include/arpa/inet.h
+++ b/libc/include/arpa/inet.h
@@ -29,9 +29,10 @@
 #ifndef _ARPA_INET_H_
 #define _ARPA_INET_H_
 
-#include <stdint.h>
-#include <sys/types.h>
 #include <netinet/in.h>
+#include <stdint.h>
+#include <sys/cdefs.h>
+#include <sys/types.h>
 
 __BEGIN_DECLS
 
diff --git a/libc/include/arpa/nameser_compat.h b/libc/include/arpa/nameser_compat.h
index 539864e..6868876 100644
--- a/libc/include/arpa/nameser_compat.h
+++ b/libc/include/arpa/nameser_compat.h
@@ -40,9 +40,10 @@
 #ifndef _ARPA_NAMESER_COMPAT_
 #define	_ARPA_NAMESER_COMPAT_
 
-#define	__BIND		19950621	/* (DEAD) interface version stamp. */
-
 #include <endian.h>
+#include <sys/cdefs.h>
+
+#define	__BIND		19950621	/* (DEAD) interface version stamp. */
 
 /*
  * Structure for query header.  The order of the fields is machine- and
diff --git a/libc/include/arpa/telnet.h b/libc/include/arpa/telnet.h
index b8212f8..594dc7a 100644
--- a/libc/include/arpa/telnet.h
+++ b/libc/include/arpa/telnet.h
@@ -32,6 +32,8 @@
 #ifndef _ARPA_TELNET_H
 #define	_ARPA_TELNET_H 1
 
+#include <sys/cdefs.h>
+
 /*
  * Definitions for the TELNET protocol.
  */
diff --git a/libc/include/bits/posix_limits.h b/libc/include/bits/posix_limits.h
index 31016a8..0f17381 100644
--- a/libc/include/bits/posix_limits.h
+++ b/libc/include/bits/posix_limits.h
@@ -29,6 +29,7 @@
 #ifndef _BITS_POSIX_LIMITS_H_
 #define _BITS_POSIX_LIMITS_H_
 
+#include <sys/cdefs.h>
 
 /* Any constant values here other than -1 or 200809L are explicitly specified by POSIX.1-2008. */
 /* Keep it sorted. */
diff --git a/libc/include/bits/pthread_types.h b/libc/include/bits/pthread_types.h
index 6ac1c68..194a49b 100644
--- a/libc/include/bits/pthread_types.h
+++ b/libc/include/bits/pthread_types.h
@@ -29,6 +29,7 @@
 #ifndef _BITS_PTHREAD_TYPES_H_
 #define _BITS_PTHREAD_TYPES_H_
 
+#include <sys/cdefs.h>
 #include <sys/types.h>
 
 typedef long pthread_t;
diff --git a/libc/include/bits/sa_family_t.h b/libc/include/bits/sa_family_t.h
index 51ea51f..98ca27f 100644
--- a/libc/include/bits/sa_family_t.h
+++ b/libc/include/bits/sa_family_t.h
@@ -29,6 +29,8 @@
 #ifndef _BITS_SA_FAMILY_T_H_
 #define _BITS_SA_FAMILY_T_H_
 
+#include <sys/cdefs.h>
+
 typedef unsigned short sa_family_t;
 
 #endif
diff --git a/libc/include/bits/timespec.h b/libc/include/bits/timespec.h
index 046d898..df7a7ce 100644
--- a/libc/include/bits/timespec.h
+++ b/libc/include/bits/timespec.h
@@ -29,6 +29,7 @@
 #ifndef _BITS_TIMESPEC_H_
 #define _BITS_TIMESPEC_H_
 
+#include <sys/cdefs.h>
 #include <sys/types.h>
 
 /*
diff --git a/libc/include/bits/wchar_limits.h b/libc/include/bits/wchar_limits.h
index f779c1a..ffad604 100644
--- a/libc/include/bits/wchar_limits.h
+++ b/libc/include/bits/wchar_limits.h
@@ -29,6 +29,8 @@
 #ifndef _BITS_WCHAR_LIMITS_H_
 #define _BITS_WCHAR_LIMITS_H_
 
+#include <sys/cdefs.h>
+
 /* Both GCC and clang define __WCHAR_MAX__. */
 #define WCHAR_MAX __WCHAR_MAX__
 
diff --git a/libc/include/byteswap.h b/libc/include/byteswap.h
index 628fb7f..0838e6c 100644
--- a/libc/include/byteswap.h
+++ b/libc/include/byteswap.h
@@ -25,9 +25,11 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  */
+
 #ifndef _BYTESWAP_H_
 #define _BYTESWAP_H_
 
+#include <sys/cdefs.h>
 #include <sys/endian.h>
 
 #define bswap_16(x) __swap16(x)
diff --git a/libc/include/elf.h b/libc/include/elf.h
index eaad1d3..1a99337 100644
--- a/libc/include/elf.h
+++ b/libc/include/elf.h
@@ -25,14 +25,15 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  */
+
 #ifndef _ELF_H
 #define _ELF_H
 
 #include <linux/auxvec.h>
 #include <linux/elf.h>
 #include <linux/elf-em.h>
-
 #include <machine/elf_machdep.h>
+#include <sys/cdefs.h>
 
 #define ELF32_R_INFO(sym, type) ((((Elf32_Word)sym) << 8) | ((type) & 0xff))
 #define ELF64_R_INFO(sym, type) ((((Elf64_Xword)sym) << 32) | ((type) & 0xffffffff))
diff --git a/libc/include/endian.h b/libc/include/endian.h
index 475b48c..65e2930 100644
--- a/libc/include/endian.h
+++ b/libc/include/endian.h
@@ -1,33 +1 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *  * Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *  * Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-#ifndef _ENDIAN_H_
-#define _ENDIAN_H_
-
 #include <sys/endian.h>
-
-#endif /* _ENDIAN_H_ */
diff --git a/libc/include/fts.h b/libc/include/fts.h
index cde0349..b46c19c 100644
--- a/libc/include/fts.h
+++ b/libc/include/fts.h
@@ -35,6 +35,7 @@
 #ifndef	_FTS_H_
 #define	_FTS_H_
 
+#include <sys/cdefs.h>
 #include <sys/types.h>
 
 typedef struct {
diff --git a/libc/include/ftw.h b/libc/include/ftw.h
index ac901cc..cb8ae7d 100644
--- a/libc/include/ftw.h
+++ b/libc/include/ftw.h
@@ -25,8 +25,9 @@
 #ifndef	_FTW_H
 #define	_FTW_H
 
-#include <sys/types.h>
+#include <sys/cdefs.h>
 #include <sys/stat.h>
+#include <sys/types.h>
 
 /*
  * Valid flags for the 3rd argument to the function that is passed as the
diff --git a/libc/include/link.h b/libc/include/link.h
index 2d189f6..f40e7e4 100644
--- a/libc/include/link.h
+++ b/libc/include/link.h
@@ -28,8 +28,9 @@
 #ifndef _LINK_H_
 #define _LINK_H_
 
-#include <sys/types.h>
 #include <elf.h>
+#include <sys/cdefs.h>
+#include <sys/types.h>
 
 __BEGIN_DECLS
 
diff --git a/libc/include/net/route.h b/libc/include/net/route.h
index 326fbe7..9c53875 100644
--- a/libc/include/net/route.h
+++ b/libc/include/net/route.h
@@ -29,6 +29,7 @@
 #ifndef _NET_ROUTE_H_
 #define _NET_ROUTE_H_
 
+#include <sys/cdefs.h>
 #include <sys/socket.h>
 #include <linux/route.h>
 #include <linux/in6.h>
diff --git a/libc/include/netinet/icmp6.h b/libc/include/netinet/icmp6.h
index e3e6e9a..eca7b45 100644
--- a/libc/include/netinet/icmp6.h
+++ b/libc/include/netinet/icmp6.h
@@ -66,6 +66,7 @@
 #define _NETINET_ICMP6_H_
 
 #include <netinet/in.h> /* android-added: glibc source compatibility. */
+#include <sys/cdefs.h>
 
 #define ICMPV6_PLD_MAXLEN	1232	/* IPV6_MMTU - sizeof(struct ip6_hdr)
 					   - sizeof(struct icmp6_hdr) */
diff --git a/libc/include/netinet/in_systm.h b/libc/include/netinet/in_systm.h
index 188268e..8da19a5 100644
--- a/libc/include/netinet/in_systm.h
+++ b/libc/include/netinet/in_systm.h
@@ -34,6 +34,7 @@
 #ifndef _NETINET_IN_SYSTM_H_
 #define _NETINET_IN_SYSTM_H_
 
+#include <sys/cdefs.h>
 #include <sys/types.h>
 
 /*
diff --git a/libc/include/netinet/ip6.h b/libc/include/netinet/ip6.h
index 52fcfae..639637e 100644
--- a/libc/include/netinet/ip6.h
+++ b/libc/include/netinet/ip6.h
@@ -64,6 +64,7 @@
 #ifndef _NETINET_IP6_H_
 #define _NETINET_IP6_H_
 
+#include <sys/cdefs.h>
 #include <sys/types.h>
 
 #include <linux/in6.h>
diff --git a/libc/include/netinet/udp.h b/libc/include/netinet/udp.h
index d4eb368..ef517d6 100644
--- a/libc/include/netinet/udp.h
+++ b/libc/include/netinet/udp.h
@@ -29,6 +29,7 @@
 #ifndef _NETINET_UDP_H
 #define _NETINET_UDP_H
 
+#include <sys/cdefs.h>
 #include <sys/types.h>
 
 #include <linux/udp.h>
diff --git a/libc/include/paths.h b/libc/include/paths.h
index ffb1737..b76d045 100644
--- a/libc/include/paths.h
+++ b/libc/include/paths.h
@@ -32,6 +32,8 @@
 #ifndef _PATHS_H_
 #define	_PATHS_H_
 
+#include <sys/cdefs.h>
+
 #define	_PATH_BSHELL	"/system/bin/sh"
 #define	_PATH_CONSOLE	"/dev/console"
 #define	_PATH_DEFPATH	"/sbin:/system/sbin:/system/bin:/system/xbin:/vendor/bin:/vendor/xbin"
diff --git a/libc/include/stdint.h b/libc/include/stdint.h
index 0ad27f1..1cedca1 100644
--- a/libc/include/stdint.h
+++ b/libc/include/stdint.h
@@ -31,6 +31,7 @@
 
 #include <bits/wchar_limits.h>
 #include <stddef.h>
+#include <sys/cdefs.h>
 
 typedef signed char __int8_t;
 typedef unsigned char __uint8_t;
diff --git a/libc/include/sys/_system_properties.h b/libc/include/sys/_system_properties.h
index 3b1f7d0..60789d4 100644
--- a/libc/include/sys/_system_properties.h
+++ b/libc/include/sys/_system_properties.h
@@ -29,6 +29,8 @@
 #ifndef _INCLUDE_SYS__SYSTEM_PROPERTIES_H
 #define _INCLUDE_SYS__SYSTEM_PROPERTIES_H
 
+#include <sys/cdefs.h>
+
 #ifndef _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
 #error you should #include <sys/system_properties.h> instead
 #else
diff --git a/libc/include/sys/cachectl.h b/libc/include/sys/cachectl.h
index 0830293..5b20c19 100644
--- a/libc/include/sys/cachectl.h
+++ b/libc/include/sys/cachectl.h
@@ -25,10 +25,13 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  */
+
 #ifndef _SYS_CACHECTL_H
 #define _SYS_CACHECTL_H 1
 
+#include <sys/cdefs.h>
 #ifdef __mips__
 #include <asm/cachectl.h>
 #endif
+
 #endif /* sys/cachectl.h */
diff --git a/libc/include/sys/msg.h b/libc/include/sys/msg.h
index 1a6d30d..73965f2 100644
--- a/libc/include/sys/msg.h
+++ b/libc/include/sys/msg.h
@@ -29,6 +29,7 @@
 #ifndef _SYS_MSG_H_
 #define _SYS_MSG_H_
 
+#include <sys/cdefs.h>
 #include <linux/msg.h>
 
 #endif /* _SYS_MSG_H_ */
diff --git a/libc/include/sys/param.h b/libc/include/sys/param.h
index 5d2248f..d3686e0 100644
--- a/libc/include/sys/param.h
+++ b/libc/include/sys/param.h
@@ -25,11 +25,13 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  */
+
 #ifndef _SYS_PARAM_H_
 #define _SYS_PARAM_H_
 
 #include <limits.h>
 #include <linux/param.h>
+#include <sys/cdefs.h>
 
 #define DEV_BSIZE 512
 
diff --git a/libc/include/sys/queue.h b/libc/include/sys/queue.h
index b0e6b38..0890838 100644
--- a/libc/include/sys/queue.h
+++ b/libc/include/sys/queue.h
@@ -32,6 +32,8 @@
 #ifndef	_SYS_QUEUE_H_
 #define	_SYS_QUEUE_H_
 
+#include <sys/cdefs.h>
+
 /*
  * This file defines five types of data structures: singly-linked lists,
  * lists, simple queues, tail queues, and circular queues.
diff --git a/libc/include/sys/reg.h b/libc/include/sys/reg.h
index b3d2aac..1066b6d 100644
--- a/libc/include/sys/reg.h
+++ b/libc/include/sys/reg.h
@@ -29,6 +29,8 @@
 #ifndef _SYS_REG_H_
 #define _SYS_REG_H_
 
+#include <sys/cdefs.h>
+
 #if defined(__i386__)
 
 #define EBX 0
diff --git a/libc/include/sys/sem.h b/libc/include/sys/sem.h
index a1ecd1f..753fc37 100644
--- a/libc/include/sys/sem.h
+++ b/libc/include/sys/sem.h
@@ -29,6 +29,7 @@
 #ifndef _SYS_SEM_H_
 #define _SYS_SEM_H_
 
+#include <sys/cdefs.h>
 #include <linux/sem.h>
 
 #endif /* _SYS_SEM_H_ */
diff --git a/libc/include/sys/syscall.h b/libc/include/sys/syscall.h
index 87cddc9..a49323d 100644
--- a/libc/include/sys/syscall.h
+++ b/libc/include/sys/syscall.h
@@ -31,6 +31,7 @@
 
 #include <asm/unistd.h> /* Linux kernel __NR_* names. */
 #include <bits/glibc-syscalls.h> /* glibc-compatible SYS_* aliases. */
+#include <sys/cdefs.h>
 
 /* The syscall function itself is declared in <unistd.h>, not here. */
 
diff --git a/libc/include/sys/sysconf.h b/libc/include/sys/sysconf.h
index c9895f2..eb30faf 100644
--- a/libc/include/sys/sysconf.h
+++ b/libc/include/sys/sysconf.h
@@ -1,33 +1,6 @@
 /*
- * Copyright (C) 2008 The Android Open Source Project
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *  * Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *  * Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * This file used to contain the declarations of sysconf and its associated constants.
+ * No standard mentions a <sys/sysconf.h>, but there are enough users in vendor (and potential ones
+ * in the NDK) to warrant not breaking source compatibility.
  */
-
-// This file used to contain the declarations of sysconf and its associated constants.
-// No standard mentions a <sys/sysconf.h>, but there are enough users in vendor (and potential ones
-// in the NDK) to warrant not breaking source compatibility.
-
 #include <bits/sysconf.h>
diff --git a/libc/include/sys/sysmacros.h b/libc/include/sys/sysmacros.h
index 54e43dd..592cc5e 100644
--- a/libc/include/sys/sysmacros.h
+++ b/libc/include/sys/sysmacros.h
@@ -29,6 +29,8 @@
 #ifndef _SYS_SYSMACROS_H_
 #define _SYS_SYSMACROS_H_
 
+#include <sys/cdefs.h>
+
 #define makedev(__major, __minor) \
   ( \
     (((__major) & 0xfffff000ULL) << 32) | (((__major) & 0xfffULL) << 8) | \
diff --git a/libc/include/sys/timerfd.h b/libc/include/sys/timerfd.h
index 8311f08..0090233 100644
--- a/libc/include/sys/timerfd.h
+++ b/libc/include/sys/timerfd.h
@@ -31,6 +31,7 @@
 
 #include <fcntl.h> /* For O_CLOEXEC and O_NONBLOCK. */
 #include <time.h>
+#include <sys/cdefs.h>
 #include <sys/types.h>
 
 __BEGIN_DECLS
diff --git a/libc/include/sys/ttydefaults.h b/libc/include/sys/ttydefaults.h
index b62aab1..62af84b 100644
--- a/libc/include/sys/ttydefaults.h
+++ b/libc/include/sys/ttydefaults.h
@@ -42,6 +42,8 @@
 #ifndef _SYS_TTYDEFAULTS_H_
 #define	_SYS_TTYDEFAULTS_H_
 
+#include <sys/cdefs.h>
+
 /*
  * Defaults on "first" open.
  */
diff --git a/libc/include/sys/ucontext.h b/libc/include/sys/ucontext.h
index f252a37..fdb3015 100644
--- a/libc/include/sys/ucontext.h
+++ b/libc/include/sys/ucontext.h
@@ -30,6 +30,7 @@
 #define _SYS_UCONTEXT_H_
 
 #include <signal.h>
+#include <sys/cdefs.h>
 #include <sys/user.h>
 
 __BEGIN_DECLS
diff --git a/libc/include/sys/un.h b/libc/include/sys/un.h
index 421b900..3e1c429 100644
--- a/libc/include/sys/un.h
+++ b/libc/include/sys/un.h
@@ -31,5 +31,6 @@
 
 #include <bits/sa_family_t.h>
 #include <linux/un.h>
+#include <sys/cdefs.h>
 
 #endif
diff --git a/libc/include/sys/xattr.h b/libc/include/sys/xattr.h
index 7e437e9..37e352d 100644
--- a/libc/include/sys/xattr.h
+++ b/libc/include/sys/xattr.h
@@ -30,6 +30,7 @@
 #define _SYS_XATTR_H_
 
 #include <linux/xattr.h>
+#include <sys/cdefs.h>
 #include <sys/types.h>
 
 __BEGIN_DECLS
diff --git a/libc/include/sysexits.h b/libc/include/sysexits.h
index e244836..97f5366 100644
--- a/libc/include/sysexits.h
+++ b/libc/include/sysexits.h
@@ -35,6 +35,8 @@
 #ifndef	_SYSEXITS_H_
 #define	_SYSEXITS_H_
 
+#include <sys/cdefs.h>
+
 /*
  *  SYSEXITS.H -- Exit status codes for system programs.
  *
diff --git a/libc/include/termio.h b/libc/include/termio.h
index 99d3630..9e26956 100644
--- a/libc/include/termio.h
+++ b/libc/include/termio.h
@@ -1,32 +1 @@
-/*
- * Copyright (C) 2010 The Android Open Source Project
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *  * Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *  * Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/* All definitions related to termio are in Linux kernel headers
- * that are already included by <termios.h>
- */
 #include <termios.h>
diff --git a/libc/include/ucontext.h b/libc/include/ucontext.h
index 5ea2982..73c2166 100644
--- a/libc/include/ucontext.h
+++ b/libc/include/ucontext.h
@@ -1,34 +1 @@
-/*
- * Copyright (C) 2014 The Android Open Source Project
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *  * Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *  * Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef _UCONTEXT_H_
-#define _UCONTEXT_H_
-
 #include <sys/ucontext.h>
-
-#endif /* _UCONTEXT_H_ */
diff --git a/libc/include/wctype.h b/libc/include/wctype.h
index 41e0ec3..96464b1 100644
--- a/libc/include/wctype.h
+++ b/libc/include/wctype.h
@@ -29,9 +29,9 @@
 #ifndef _WCTYPE_H_
 #define _WCTYPE_H_
 
-#include <wchar.h>
-
 #include <bits/wctype.h>
+#include <wchar.h>
+#include <sys/cdefs.h>
 
 __BEGIN_DECLS
 
diff --git a/libc/include/xlocale.h b/libc/include/xlocale.h
index f7eb8f4..559d24d 100644
--- a/libc/include/xlocale.h
+++ b/libc/include/xlocale.h
@@ -29,6 +29,8 @@
 #ifndef _XLOCALE_H_
 #define _XLOCALE_H_
 
+#include <sys/cdefs.h>
+
 /* If we just use void* here, GCC exposes that in error messages. */
 struct __locale_t;
 typedef struct __locale_t* locale_t;