Revert "Revert "Cleanup transitive includes in the legacy inlines.""

This reverts commit 9cb8639b18.

Fixed all the broken builds that were reported to me before this was
reverted.

Test: make checkbuild  # kikey960, marlin, aosp_arm64; master and aosp
This commit is contained in:
Dan Albert 2017-10-17 11:07:26 -07:00
parent 435e6384de
commit f945fb6b8a
10 changed files with 38 additions and 24 deletions

View file

@ -29,11 +29,12 @@
#ifndef _ANDROID_LEGACY_ERRNO_INLINES_H
#define _ANDROID_LEGACY_ERRNO_INLINES_H
#include <errno.h>
#include <sys/cdefs.h>
#if __ANDROID_API__ < __ANDROID_API_L__
#include <errno.h>
__BEGIN_DECLS
static __inline int __attribute__((deprecated)) __set_errno(int n) {

View file

@ -29,10 +29,12 @@
#ifndef ANDROID_LEGACY_FENV_INLINES_ARM_H
#define ANDROID_LEGACY_FENV_INLINES_ARM_H
#include <fenv.h>
#include <sys/cdefs.h>
#if __ANDROID_API__ < __ANDROID_API_L__ && defined(__arm__)
#include <fenv.h>
__BEGIN_DECLS
#define FPSCR_ENABLE_SHIFT 8

View file

@ -29,10 +29,12 @@
#ifndef ANDROID_LEGACY_FENV_INLINES_MIPS_H
#define ANDROID_LEGACY_FENV_INLINES_MIPS_H
#include <fenv.h>
#include <sys/cdefs.h>
#if __ANDROID_API__ < __ANDROID_API_L__ && (defined(__mips__) && !defined(__LP64__))
#include <fenv.h>
__BEGIN_DECLS
#define FCSR_CAUSE_SHIFT 10

View file

@ -29,16 +29,16 @@
#ifndef _ANDROID_LEGACY_SIGNAL_INLINES_H_
#define _ANDROID_LEGACY_SIGNAL_INLINES_H_
#include <sys/cdefs.h>
#if __ANDROID_API__ < __ANDROID_API_L__
#include <errno.h>
#include <signal.h>
#include <string.h>
#include <sys/cdefs.h>
__BEGIN_DECLS
#if __ANDROID_API__ < __ANDROID_API_L__
sighandler_t bsd_signal(int __signal, sighandler_t __handler) __REMOVED_IN(21);
/* These weren't introduced until L. */
@ -117,8 +117,8 @@ static __inline sighandler_t signal(int s, sighandler_t f) {
return bsd_signal(s, f);
}
#endif /* __ANDROID_API__ < __ANDROID_API_L__ */
__END_DECLS
#endif /* __ANDROID_API__ < __ANDROID_API_L__ */
#endif /* _ANDROID_LEGACY_SIGNAL_INLINES_H_ */

View file

@ -29,13 +29,14 @@
#ifndef _ANDROID_LEGACY_STDLIB_INLINES_H_
#define _ANDROID_LEGACY_STDLIB_INLINES_H_
#include <errno.h>
#include <float.h>
#include <stdlib.h>
#include <sys/cdefs.h>
#if __ANDROID_API__ < __ANDROID_API_L__
#include <errno.h>
#include <float.h>
#include <stdlib.h>
__BEGIN_DECLS
static __inline float strtof(const char* nptr, char** endptr) {

View file

@ -29,16 +29,19 @@
#ifndef _ANDROID_LEGACY_STRINGS_INLINES_H_
#define _ANDROID_LEGACY_STRINGS_INLINES_H_
#include <strings.h>
#include <sys/cdefs.h>
#if defined(__i386__) && __ANDROID_API__ < __ANDROID_API_J_MR2__
#include <strings.h>
__BEGIN_DECLS
#if defined(__i386__) && __ANDROID_API__ < __ANDROID_API_J_MR2__
/* Everyone except x86 had ffs since the beginning. */
static __inline int ffs(int __n) { return __builtin_ffs(__n); }
#endif
__END_DECLS
#endif
#endif

View file

@ -29,12 +29,13 @@
#pragma once
#include <sys/cdefs.h>
#include <sys/mman.h>
#include <sys/syscall.h>
#include <unistd.h>
#if __ANDROID_API__ < __ANDROID_API_L__
#include <errno.h>
#include <sys/mman.h>
#include <unistd.h>
__BEGIN_DECLS
/*

View file

@ -30,10 +30,11 @@
#define _ANDROID_LEGACY_SYS_STAT_INLINES_H_
#include <sys/cdefs.h>
#include <sys/stat.h>
#if __ANDROID_API__ < __ANDROID_API_L__
#include <sys/stat.h>
__BEGIN_DECLS
static __inline int mkfifo(const char* __path, mode_t __mode) {

View file

@ -30,12 +30,13 @@
#define _ANDROID_LEGACY_SYS_WAIT_INLINES_H_
#include <sys/cdefs.h>
#if __ANDROID_API__ < __ANDROID_API_J_MR2__
#include <sys/syscall.h>
#include <sys/wait.h>
#include <unistd.h>
#if __ANDROID_API__ < __ANDROID_API_J_MR2__
__BEGIN_DECLS
static __inline pid_t wait4(pid_t pid, int* status, int options, struct rusage* rusage) {

View file

@ -30,14 +30,16 @@
#define _ANDROID_LEGACY_TERMIOS_INLINES_H_
#include <sys/cdefs.h>
#if __ANDROID_API__ < __ANDROID_API_L__
#include <linux/termios.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <linux/termios.h>
#if __ANDROID_API__ < __ANDROID_API_L__
#define __BIONIC_TERMIOS_INLINE static __inline
#include <bits/termios_inlines.h>
#endif
#endif /* _ANDROID_LEGACY_TERMIOS_INLINES_H_ */