From 2b333ea31ec5b5b4627f14b22253b017b346638a Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Wed, 18 Dec 2013 11:21:55 -0800 Subject: [PATCH] Remove . Bug: 12175484 Change-Id: I127f7f91f36bd879109d653e0c56ec56e2529d4d --- libc/arch-aarch64/include/machine/kernel.h | 44 ------------- libc/arch-arm/include/machine/kernel.h | 42 ------------- libc/arch-mips/include/machine/kernel.h | 42 ------------- libc/arch-x86/include/machine/kernel.h | 40 ------------ libc/arch-x86_64/include/machine/kernel.h | 41 ------------ libc/include/sys/types.h | 72 ++++++++++------------ 6 files changed, 31 insertions(+), 250 deletions(-) delete mode 100644 libc/arch-aarch64/include/machine/kernel.h delete mode 100644 libc/arch-arm/include/machine/kernel.h delete mode 100644 libc/arch-mips/include/machine/kernel.h delete mode 100644 libc/arch-x86/include/machine/kernel.h delete mode 100644 libc/arch-x86_64/include/machine/kernel.h diff --git a/libc/arch-aarch64/include/machine/kernel.h b/libc/arch-aarch64/include/machine/kernel.h deleted file mode 100644 index 070e704ed..000000000 --- a/libc/arch-aarch64/include/machine/kernel.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2013 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 _ARCH_AARCH64_KERNEL_H -#define _ARCH_AARCH64_KERNEL_H - -/* this file contains kernel-specific definitions that were optimized out of - our processed kernel headers, but still useful nonetheless... */ - -typedef unsigned long __kernel_blkcnt_t; -typedef unsigned long __kernel_blksize_t; - -/* these aren't really defined by the kernel headers though... */ -typedef unsigned long __kernel_fsblkcnt_t; -typedef unsigned long __kernel_fsfilcnt_t; -typedef unsigned int __kernel_id_t; - -#endif /* _ARCH_ARM_KERNEL_H */ - diff --git a/libc/arch-arm/include/machine/kernel.h b/libc/arch-arm/include/machine/kernel.h deleted file mode 100644 index 462b8e3be..000000000 --- a/libc/arch-arm/include/machine/kernel.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 _ARCH_ARM_KERNEL_H -#define _ARCH_ARM_KERNEL_H - -/* this file contains kernel-specific definitions that were optimized out of - our processed kernel headers, but still useful nonetheless... */ - -typedef unsigned long __kernel_blkcnt_t; -typedef unsigned long __kernel_blksize_t; - -/* these aren't really defined by the kernel headers though... */ -typedef unsigned long __kernel_fsblkcnt_t; -typedef unsigned long __kernel_fsfilcnt_t; -typedef unsigned int __kernel_id_t; - -#endif /* _ARCH_ARM_KERNEL_H */ diff --git a/libc/arch-mips/include/machine/kernel.h b/libc/arch-mips/include/machine/kernel.h deleted file mode 100644 index 69ad40cd1..000000000 --- a/libc/arch-mips/include/machine/kernel.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 _ARCH_MIPS_KERNEL_H -#define _ARCH_MIPS_KERNEL_H - -/* this file contains kernel-specific definitions that were optimized out of - our processed kernel headers, but still useful nonetheless... */ - -typedef unsigned long __kernel_blkcnt_t; -typedef unsigned long __kernel_blksize_t; - -/* these aren't really defined by the kernel headers though... */ -typedef unsigned long __kernel_fsblkcnt_t; -typedef unsigned long __kernel_fsfilcnt_t; -typedef unsigned int __kernel_id_t; - -#endif /* _ARCH_MIPS_KERNEL_H */ diff --git a/libc/arch-x86/include/machine/kernel.h b/libc/arch-x86/include/machine/kernel.h deleted file mode 100644 index d5df7a012..000000000 --- a/libc/arch-x86/include/machine/kernel.h +++ /dev/null @@ -1,40 +0,0 @@ -/* -** Copyright 2006-2008, The Android Open Source Project -** -** 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. -** * Neither the name of Google Inc. nor the names of its contributors may -** be used to endorse or promote products derived from this software -** without specific prior written permission. -** -** THIS SOFTWARE IS PROVIDED BY Google Inc. ``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 Google Inc. 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 _ARCH_X86_KERNEL_H -#define _ARCH_X86_KERNEL_H - -/* this file contains kernel-specific definitions that were optimized out of - our processed kernel headers, but still useful nonetheless... */ - -typedef unsigned long __kernel_blkcnt_t; -typedef unsigned long __kernel_blksize_t; - -/* these aren't really defined by the kernel headers though... */ -typedef unsigned long __kernel_fsblkcnt_t; -typedef unsigned long __kernel_fsfilcnt_t; -typedef unsigned int __kernel_id_t; - -#endif /* _ARCH_X86_KERNEL_H */ diff --git a/libc/arch-x86_64/include/machine/kernel.h b/libc/arch-x86_64/include/machine/kernel.h deleted file mode 100644 index 8fc9d6c9d..000000000 --- a/libc/arch-x86_64/include/machine/kernel.h +++ /dev/null @@ -1,41 +0,0 @@ -/* -** Copyright 2006-2008, The Android Open Source Project -** -** 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. -** * Neither the name of Google Inc. nor the names of its contributors may -** be used to endorse or promote products derived from this software -** without specific prior written permission. -** -** THIS SOFTWARE IS PROVIDED BY Google Inc. ``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 Google Inc. 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 _ARCH_X86_64_KERNEL_H -#define _ARCH_X86_64_KERNEL_H - -/* this file contains kernel-specific definitions that were optimized out of - our processed kernel headers, but still useful nonetheless... */ - -typedef __kernel_ulong_t __kernel_blkcnt_t; -typedef __kernel_ulong_t __kernel_blksize_t; - -/* these aren't really defined by the kernel headers though... */ -typedef __kernel_ulong_t __kernel_fsblkcnt_t; -typedef __kernel_ulong_t __kernel_fsfilcnt_t; -typedef unsigned int __kernel_id_t; - -#endif /* _ARCH_X86_64_KERNEL_H */ diff --git a/libc/include/sys/types.h b/libc/include/sys/types.h index 978393ce5..a307334cd 100644 --- a/libc/include/sys/types.h +++ b/libc/include/sys/types.h @@ -32,44 +32,44 @@ #include #include -#include -#include #include -#include +#include -typedef __u32 __kernel_dev_t; - -/* be careful with __kernel_gid_t and __kernel_uid_t - * these are defined as 16-bit for legacy reason, but - * the kernel uses 32-bits instead. - * - * 32-bit values are required for Android, so use - * __kernel_uid32_t and __kernel_gid32_t +/* __kernel_gid_t and __kernel_uid_t are 16 bit for legacy reasons. + * Android uses __kernel_uid32_t and __kernel_gid32_t instead. */ +typedef __kernel_gid32_t gid_t; +typedef __kernel_uid32_t uid_t; -typedef __kernel_blkcnt_t blkcnt_t; -typedef __kernel_blksize_t blksize_t; -typedef __kernel_clock_t clock_t; -typedef __kernel_clockid_t clockid_t; -typedef __kernel_dev_t dev_t; -typedef __kernel_fsblkcnt_t fsblkcnt_t; -typedef __kernel_fsfilcnt_t fsfilcnt_t; -typedef __kernel_gid32_t gid_t; -typedef __kernel_uid32_t uid_t; -typedef __kernel_id_t id_t; -typedef __kernel_ino_t ino_t; -typedef __kernel_key_t key_t; -typedef __kernel_mode_t mode_t; +typedef __kernel_ulong_t blkcnt_t; +typedef __kernel_ulong_t blksize_t; +typedef __kernel_caddr_t caddr_t; +typedef __kernel_clock_t clock_t; +typedef __kernel_clockid_t clockid_t; +typedef __kernel_daddr_t daddr_t; +typedef __u32 dev_t; +typedef __kernel_ulong_t fsblkcnt_t; +typedef __kernel_ulong_t fsfilcnt_t; +typedef __u32 id_t; +typedef __kernel_ino_t ino_t; +typedef __kernel_key_t key_t; +typedef __kernel_mode_t mode_t; +typedef __nlink_t nlink_t; +typedef __kernel_pid_t pid_t; +typedef __kernel_suseconds_t suseconds_t; +typedef __kernel_timer_t timer_t; +typedef unsigned int useconds_t; + +/* This historical accident means that we had a 32-bit time_t on 32-bit architectures. */ +typedef __kernel_time_t time_t; + +/* This historical accident means that we had a 32-bit off_t on 32-bit architectures. */ #ifndef _OFF_T_DEFINED_ #define _OFF_T_DEFINED_ -typedef __kernel_off_t off_t; +typedef __kernel_off_t off_t; #endif -typedef __kernel_loff_t loff_t; -typedef loff_t off64_t; - -typedef __kernel_pid_t pid_t; - -typedef __nlink_t nlink_t; +typedef __kernel_loff_t loff_t; +typedef loff_t off64_t; /* while POSIX wants these in , we * declare then in instead */ @@ -95,16 +95,6 @@ typedef .... pthread_t; typedef __kernel_ssize_t ssize_t; #endif -typedef __kernel_time_t time_t; - -typedef __kernel_suseconds_t suseconds_t; -typedef unsigned int useconds_t; - -typedef __kernel_daddr_t daddr_t; -typedef __kernel_timer_t timer_t; -typedef __kernel_mqd_t mqd_t; - -typedef __kernel_caddr_t caddr_t; typedef unsigned int uint_t; typedef unsigned int uint;