diff --git a/ndk/platforms/android-21/include/sgidefs.h b/ndk/platforms/android-21/arch-mips/include/sgidefs.h similarity index 98% rename from ndk/platforms/android-21/include/sgidefs.h rename to ndk/platforms/android-21/arch-mips/include/sgidefs.h index 5614e592a..8b37bf087 100644 --- a/ndk/platforms/android-21/include/sgidefs.h +++ b/ndk/platforms/android-21/arch-mips/include/sgidefs.h @@ -29,8 +29,6 @@ #ifndef _SGIDEFS_H_ #define _SGIDEFS_H_ -#ifdef __mips__ #include -#endif #endif /* _SGIDEFS_H_ */ diff --git a/ndk/platforms/android-21/arch-mips64/include/sgidefs.h b/ndk/platforms/android-21/arch-mips64/include/sgidefs.h new file mode 100644 index 000000000..8b37bf087 --- /dev/null +++ b/ndk/platforms/android-21/arch-mips64/include/sgidefs.h @@ -0,0 +1,34 @@ +/* + * 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 _SGIDEFS_H_ +#define _SGIDEFS_H_ + +#include + +#endif /* _SGIDEFS_H_ */ diff --git a/ndk/platforms/android-21/include/android/dlext.h b/ndk/platforms/android-21/include/android/dlext.h index 6482f481e..8f4a0efd5 100644 --- a/ndk/platforms/android-21/include/android/dlext.h +++ b/ndk/platforms/android-21/include/android/dlext.h @@ -18,8 +18,8 @@ #define __ANDROID_DLEXT_H__ #include -#include #include +#include __BEGIN_DECLS diff --git a/ndk/platforms/android-21/include/fts.h b/ndk/platforms/android-21/include/fts.h index d18fc2cc7..cde0349ba 100644 --- a/ndk/platforms/android-21/include/fts.h +++ b/ndk/platforms/android-21/include/fts.h @@ -113,8 +113,6 @@ typedef struct _ftsent { char fts_name[1]; /* file name */ } FTSENT; -#include - __BEGIN_DECLS FTSENT *fts_children(FTS *, int); int fts_close(FTS *); diff --git a/ndk/platforms/android-21/include/string.h b/ndk/platforms/android-21/include/string.h index 8df68e38d..c5840db89 100644 --- a/ndk/platforms/android-21/include/string.h +++ b/ndk/platforms/android-21/include/string.h @@ -189,13 +189,13 @@ size_t strlcpy(char* __restrict dest, const char* __restrict src, size_t size) { size_t bos = __bos(dest); #if !defined(__clang__) - // Compiler doesn't know destination size. Don't call __strlcpy_chk + // Compiler does not know destination size. Do not call __strlcpy_chk if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) { return __strlcpy_real(dest, src, size); } // Compiler can prove, at compile time, that the passed in size - // is always <= the actual object size. Don't call __strlcpy_chk + // is always <= the actual object size. Do not call __strlcpy_chk if (__builtin_constant_p(size) && (size <= bos)) { return __strlcpy_real(dest, src, size); } @@ -214,13 +214,13 @@ size_t strlcat(char* __restrict dest, const char* __restrict src, size_t size) { size_t bos = __bos(dest); #if !defined(__clang__) - // Compiler doesn't know destination size. Don't call __strlcat_chk + // Compiler does not know destination size. Do not call __strlcat_chk if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) { return __strlcat_real(dest, src, size); } // Compiler can prove, at compile time, that the passed in size - // is always <= the actual object size. Don't call __strlcat_chk + // is always <= the actual object size. Do not call __strlcat_chk if (__builtin_constant_p(size) && (size <= bos)) { return __strlcat_real(dest, src, size); } @@ -234,7 +234,7 @@ size_t strlen(const char *s) { size_t bos = __bos(s); #if !defined(__clang__) - // Compiler doesn't know destination size. Don't call __strlen_chk + // Compiler does not know destination size. Do not call __strlen_chk if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) { return __builtin_strlen(s); } @@ -253,7 +253,7 @@ char* strchr(const char *s, int c) { size_t bos = __bos(s); #if !defined(__clang__) - // Compiler doesn't know destination size. Don't call __strchr_chk + // Compiler does not know destination size. Do not call __strchr_chk if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) { return __builtin_strchr(s, c); } @@ -272,7 +272,7 @@ char* strrchr(const char *s, int c) { size_t bos = __bos(s); #if !defined(__clang__) - // Compiler doesn't know destination size. Don't call __strrchr_chk + // Compiler does not know destination size. Do not call __strrchr_chk if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) { return __builtin_strrchr(s, c); } diff --git a/ndk/platforms/android-21/include/sys/user.h b/ndk/platforms/android-21/include/sys/user.h index 07a112082..c969726a4 100644 --- a/ndk/platforms/android-21/include/sys/user.h +++ b/ndk/platforms/android-21/include/sys/user.h @@ -31,7 +31,7 @@ #include #include /* For PAGE_SIZE. */ -#include /* For size_t */ +#include /* For size_t. */ __BEGIN_DECLS @@ -92,7 +92,7 @@ struct user { unsigned long start_stack; long int signal; int reserved; - unsigned long u_ar0; + struct user_regs_struct* u_ar0; struct user_fpregs_struct* u_fpstate; unsigned long magic; char u_comm[32]; @@ -109,7 +109,7 @@ struct user_fpregs_struct { __u64 rip; __u64 rdp; __u32 mxcsr; - __u32 mxcsr_mask; + __u32 mxcr_mask; __u32 st_space[32]; __u32 xmm_space[64]; __u32 padding[24]; @@ -156,7 +156,7 @@ struct user { long int signal; int reserved; int pad1; - unsigned long u_ar0; + struct user_regs_struct* u_ar0; struct user_fpregs_struct* u_fpstate; unsigned long magic; char u_comm[32]; @@ -166,7 +166,7 @@ struct user { }; #elif defined(__mips__) -struct user_regs_struct +struct user_regs_struct { unsigned long regs[180 / sizeof(unsigned long) + 64]; }; @@ -180,7 +180,7 @@ struct user { unsigned long start_data; unsigned long start_stack; long int signal; - unsigned long u_ar0; + void* u_ar0; unsigned long magic; char u_comm[32]; }; diff --git a/ndk/platforms/android-8/include/fts.h b/ndk/platforms/android-8/include/fts.h index d18fc2cc7..cde0349ba 100644 --- a/ndk/platforms/android-8/include/fts.h +++ b/ndk/platforms/android-8/include/fts.h @@ -113,8 +113,6 @@ typedef struct _ftsent { char fts_name[1]; /* file name */ } FTSENT; -#include - __BEGIN_DECLS FTSENT *fts_children(FTS *, int); int fts_close(FTS *);