misc header changes for r10d
1. move sgidefs.h to libc/arch-mips. See bionic 6e50cb454451916ced315680f6c13dc08cf3959a 2. change type of u_ar0 from "unsigned long" to "struct user_regs_struct*". See bionic e03950fa0c5567edf70d011b856a027e03b1c0f7 3. sync fts.h, dlext.h, sys/user.h 4. remove ' from string.h Change-Id: I2ba58b0df4c655f107ea086efbd0220de2b40e9a
This commit is contained in:
@@ -29,8 +29,6 @@
|
|||||||
#ifndef _SGIDEFS_H_
|
#ifndef _SGIDEFS_H_
|
||||||
#define _SGIDEFS_H_
|
#define _SGIDEFS_H_
|
||||||
|
|
||||||
#ifdef __mips__
|
|
||||||
#include <asm/sgidefs.h>
|
#include <asm/sgidefs.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* _SGIDEFS_H_ */
|
#endif /* _SGIDEFS_H_ */
|
||||||
34
ndk/platforms/android-21/arch-mips64/include/sgidefs.h
Normal file
34
ndk/platforms/android-21/arch-mips64/include/sgidefs.h
Normal file
@@ -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 <asm/sgidefs.h>
|
||||||
|
|
||||||
|
#endif /* _SGIDEFS_H_ */
|
||||||
@@ -18,8 +18,8 @@
|
|||||||
#define __ANDROID_DLEXT_H__
|
#define __ANDROID_DLEXT_H__
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <sys/cdefs.h>
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <sys/cdefs.h>
|
||||||
|
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
|
|
||||||
|
|||||||
@@ -113,8 +113,6 @@ typedef struct _ftsent {
|
|||||||
char fts_name[1]; /* file name */
|
char fts_name[1]; /* file name */
|
||||||
} FTSENT;
|
} FTSENT;
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
|
||||||
|
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
FTSENT *fts_children(FTS *, int);
|
FTSENT *fts_children(FTS *, int);
|
||||||
int fts_close(FTS *);
|
int fts_close(FTS *);
|
||||||
|
|||||||
@@ -189,13 +189,13 @@ size_t strlcpy(char* __restrict dest, const char* __restrict src, size_t size) {
|
|||||||
size_t bos = __bos(dest);
|
size_t bos = __bos(dest);
|
||||||
|
|
||||||
#if !defined(__clang__)
|
#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) {
|
if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) {
|
||||||
return __strlcpy_real(dest, src, size);
|
return __strlcpy_real(dest, src, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Compiler can prove, at compile time, that the passed in 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)) {
|
if (__builtin_constant_p(size) && (size <= bos)) {
|
||||||
return __strlcpy_real(dest, src, size);
|
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);
|
size_t bos = __bos(dest);
|
||||||
|
|
||||||
#if !defined(__clang__)
|
#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) {
|
if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) {
|
||||||
return __strlcat_real(dest, src, size);
|
return __strlcat_real(dest, src, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Compiler can prove, at compile time, that the passed in 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)) {
|
if (__builtin_constant_p(size) && (size <= bos)) {
|
||||||
return __strlcat_real(dest, src, size);
|
return __strlcat_real(dest, src, size);
|
||||||
}
|
}
|
||||||
@@ -234,7 +234,7 @@ size_t strlen(const char *s) {
|
|||||||
size_t bos = __bos(s);
|
size_t bos = __bos(s);
|
||||||
|
|
||||||
#if !defined(__clang__)
|
#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) {
|
if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) {
|
||||||
return __builtin_strlen(s);
|
return __builtin_strlen(s);
|
||||||
}
|
}
|
||||||
@@ -253,7 +253,7 @@ char* strchr(const char *s, int c) {
|
|||||||
size_t bos = __bos(s);
|
size_t bos = __bos(s);
|
||||||
|
|
||||||
#if !defined(__clang__)
|
#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) {
|
if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) {
|
||||||
return __builtin_strchr(s, c);
|
return __builtin_strchr(s, c);
|
||||||
}
|
}
|
||||||
@@ -272,7 +272,7 @@ char* strrchr(const char *s, int c) {
|
|||||||
size_t bos = __bos(s);
|
size_t bos = __bos(s);
|
||||||
|
|
||||||
#if !defined(__clang__)
|
#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) {
|
if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) {
|
||||||
return __builtin_strrchr(s, c);
|
return __builtin_strrchr(s, c);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
#include <limits.h> /* For PAGE_SIZE. */
|
#include <limits.h> /* For PAGE_SIZE. */
|
||||||
#include <stddef.h> /* For size_t */
|
#include <stddef.h> /* For size_t. */
|
||||||
|
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
|
|
||||||
@@ -92,7 +92,7 @@ struct user {
|
|||||||
unsigned long start_stack;
|
unsigned long start_stack;
|
||||||
long int signal;
|
long int signal;
|
||||||
int reserved;
|
int reserved;
|
||||||
unsigned long u_ar0;
|
struct user_regs_struct* u_ar0;
|
||||||
struct user_fpregs_struct* u_fpstate;
|
struct user_fpregs_struct* u_fpstate;
|
||||||
unsigned long magic;
|
unsigned long magic;
|
||||||
char u_comm[32];
|
char u_comm[32];
|
||||||
@@ -109,7 +109,7 @@ struct user_fpregs_struct {
|
|||||||
__u64 rip;
|
__u64 rip;
|
||||||
__u64 rdp;
|
__u64 rdp;
|
||||||
__u32 mxcsr;
|
__u32 mxcsr;
|
||||||
__u32 mxcsr_mask;
|
__u32 mxcr_mask;
|
||||||
__u32 st_space[32];
|
__u32 st_space[32];
|
||||||
__u32 xmm_space[64];
|
__u32 xmm_space[64];
|
||||||
__u32 padding[24];
|
__u32 padding[24];
|
||||||
@@ -156,7 +156,7 @@ struct user {
|
|||||||
long int signal;
|
long int signal;
|
||||||
int reserved;
|
int reserved;
|
||||||
int pad1;
|
int pad1;
|
||||||
unsigned long u_ar0;
|
struct user_regs_struct* u_ar0;
|
||||||
struct user_fpregs_struct* u_fpstate;
|
struct user_fpregs_struct* u_fpstate;
|
||||||
unsigned long magic;
|
unsigned long magic;
|
||||||
char u_comm[32];
|
char u_comm[32];
|
||||||
@@ -166,7 +166,7 @@ struct user {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#elif defined(__mips__)
|
#elif defined(__mips__)
|
||||||
struct user_regs_struct
|
struct user_regs_struct
|
||||||
{
|
{
|
||||||
unsigned long regs[180 / sizeof(unsigned long) + 64];
|
unsigned long regs[180 / sizeof(unsigned long) + 64];
|
||||||
};
|
};
|
||||||
@@ -180,7 +180,7 @@ struct user {
|
|||||||
unsigned long start_data;
|
unsigned long start_data;
|
||||||
unsigned long start_stack;
|
unsigned long start_stack;
|
||||||
long int signal;
|
long int signal;
|
||||||
unsigned long u_ar0;
|
void* u_ar0;
|
||||||
unsigned long magic;
|
unsigned long magic;
|
||||||
char u_comm[32];
|
char u_comm[32];
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -113,8 +113,6 @@ typedef struct _ftsent {
|
|||||||
char fts_name[1]; /* file name */
|
char fts_name[1]; /* file name */
|
||||||
} FTSENT;
|
} FTSENT;
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
|
||||||
|
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
FTSENT *fts_children(FTS *, int);
|
FTSENT *fts_children(FTS *, int);
|
||||||
int fts_close(FTS *);
|
int fts_close(FTS *);
|
||||||
|
|||||||
Reference in New Issue
Block a user