summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2014-12-19 19:30:11 -0800
committerElliott Hughes <enh@google.com>2014-12-19 19:30:11 -0800
commit998f2d5a50adffcc0447912fb6a7af2dac7accf1 (patch)
treefd23600f7789cf9e5dee8c7e63eab45dbe8e1db5
parent7eb9b6c537c32280571fead8676634c3dfc6388e (diff)
downloadbionic-998f2d5a50adffcc0447912fb6a7af2dac7accf1.zip
bionic-998f2d5a50adffcc0447912fb6a7af2dac7accf1.tar.gz
bionic-998f2d5a50adffcc0447912fb6a7af2dac7accf1.tar.bz2
Remove more BSD cruft from the public headers.
Change-Id: I1e3097f745b526db448bf72fbc05fb2ba23929a0
-rw-r--r--libc/include/sys/cdefs.h11
-rw-r--r--libc/include/sys/cdefs_elf.h43
-rw-r--r--libc/upstream-openbsd/android/include/openbsd-compat.h3
-rw-r--r--libm/freebsd-compat.h2
4 files changed, 8 insertions, 51 deletions
diff --git a/libc/include/sys/cdefs.h b/libc/include/sys/cdefs.h
index 6f238a9..21d59fa 100644
--- a/libc/include/sys/cdefs.h
+++ b/libc/include/sys/cdefs.h
@@ -77,7 +77,9 @@
#define __GNUC_PREREQ(x, y) 0
#endif
-#include <sys/cdefs_elf.h>
+#define __strong_alias(alias, sym) \
+ __asm__(".global " #alias "\n" \
+ #alias " = " #sym);
#if defined(__cplusplus)
#define __BEGIN_DECLS extern "C" {
@@ -263,13 +265,6 @@
#endif
#endif /* !(__STDC_VERSION__ >= 199901L) */
-#if defined(_KERNEL)
-#if defined(NO_KERNEL_RCSIDS)
-#undef __KERNEL_RCSID
-#define __KERNEL_RCSID(_n, _s) /* nothing */
-#endif /* NO_KERNEL_RCSIDS */
-#endif /* _KERNEL */
-
/*
* A barrier to stop the optimizer from moving code or assume live
* register values. This is gcc specific, the version is more or less
diff --git a/libc/include/sys/cdefs_elf.h b/libc/include/sys/cdefs_elf.h
deleted file mode 100644
index a40a867..0000000
--- a/libc/include/sys/cdefs_elf.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* $NetBSD: cdefs_elf.h,v 1.22 2005/02/26 22:25:34 perry Exp $ */
-
-/*
- * Copyright (c) 1995, 1996 Carnegie-Mellon University.
- * All rights reserved.
- *
- * Author: Chris G. Demetriou
- *
- * Permission to use, copy, modify and distribute this software and
- * its documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
- * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * Carnegie Mellon requests users of this software to return to
- *
- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
- * School of Computer Science
- * Carnegie Mellon University
- * Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie the
- * rights to redistribute these changes.
- */
-
-#ifndef _SYS_CDEFS_ELF_H_
-#define _SYS_CDEFS_ELF_H_
-
-#define __strong_alias(alias, sym) \
- __asm__(".global " #alias "\n" \
- #alias " = " #sym);
-
-/* We use __warnattr instead of __warn_references.
- * TODO: remove this and put an empty definition in one of the upstream-* compatibility headers.
- */
-#define __warn_references(sym,msg) \
- /*__asm__(".section .gnu.warning." #sym "\n\t.ascii \"" msg "\"\n\t.text");*/
-
-#endif /* !_SYS_CDEFS_ELF_H_ */
diff --git a/libc/upstream-openbsd/android/include/openbsd-compat.h b/libc/upstream-openbsd/android/include/openbsd-compat.h
index 8386ba5..8783467 100644
--- a/libc/upstream-openbsd/android/include/openbsd-compat.h
+++ b/libc/upstream-openbsd/android/include/openbsd-compat.h
@@ -35,6 +35,9 @@
/* Ignore all __weak_alias in OpenBSD. */
#define __weak_alias(alias,sym)
+/* Ignore all __warn_references in OpenBSD. */
+#define __warn_references(sym,msg)
+
/* OpenBSD's <ctype.h> uses these names, which conflicted with stlport.
* Additionally, we changed the numeric/digit type from N to D for libcxx.
*/
diff --git a/libm/freebsd-compat.h b/libm/freebsd-compat.h
index 1481cc2..a4dd6c2 100644
--- a/libm/freebsd-compat.h
+++ b/libm/freebsd-compat.h
@@ -26,6 +26,8 @@
#define __strong_reference(sym,aliassym) \
extern __typeof (sym) aliassym __attribute__ ((__alias__ (#sym)))
+#define __warn_references(sym,msg) /* ignored */
+
/* digittoint is in BSD's <ctype.h>. */
int digittoint(char ch);