Merge "Update 64-bit headers/libs"

This commit is contained in:
Andrew Hsieh
2014-04-11 17:33:03 +00:00
committed by Gerrit Code Review
83 changed files with 855 additions and 1517 deletions

View File

@@ -1,62 +0,0 @@
/* $OpenBSD: limits.h,v 1.3 2006/01/06 22:48:46 millert Exp $ */
/* $NetBSD: limits.h,v 1.4 2003/04/28 23:16:18 bjh21 Exp $ */
/*
* Copyright (c) 1988 The Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. 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.
* 3. Neither the name of the University 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 THE REGENTS 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 REGENTS 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.
*
* from: @(#)limits.h 7.2 (Berkeley) 6/28/90
*/
#ifndef _AARCH64_LIMITS_H_
#define _AARCH64_LIMITS_H_
#include <sys/cdefs.h>
#define MB_LEN_MAX 1 /* no multibyte characters */
#define LONGLONG_BIT 64
#define LONGLONG_MIN (-9223372036854775807LL-1)
#define LONGLONG_MAX 9223372036854775807LL
#define ULONGLONG_MAX 18446744073709551615ULL
#ifndef SIZE_MAX
#define SIZE_MAX ULONGLONG_MAX /* max value for a size_t */
#endif
#ifndef SSIZE_MAX
#define SSIZE_MAX LONGLONG_MAX /* max value for a ssize_t */
#endif
#if __BSD_VISIBLE
#define SIZE_T_MAX ULONG_MAX /* max value for a size_t (historic) */
#define UQUAD_MAX 0xffffffffffffffffULL /* max unsigned quad */
#define QUAD_MAX 0x7fffffffffffffffLL /* max signed quad */
#define QUAD_MIN (-0x7fffffffffffffffLL-1) /* min signed quad */
#endif /* __BSD_VISIBLE */
#endif /* _AARCH64_LIMITS_H_ */

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,36 @@
/*
* Copyright (C) 2012 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.
*/
extern void *__dso_handle;
extern int __cxa_atexit(void (*)(void*), void*, void*);
__attribute__ ((visibility ("hidden")))
int atexit(void (*func)(void)) {
return (__cxa_atexit((void (*)(void*)) func, (void*) 0, &__dso_handle));
}

View File

@@ -0,0 +1,69 @@
/*
* 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.
*/
#include "../../bionic/libc_init_common.h"
#include <stddef.h>
#include <stdint.h>
__attribute__ ((section (".preinit_array")))
void (*__PREINIT_ARRAY__)(void) = (void (*)(void)) -1;
__attribute__ ((section (".init_array")))
void (*__INIT_ARRAY__)(void) = (void (*)(void)) -1;
__attribute__ ((section (".fini_array")))
void (*__FINI_ARRAY__)(void) = (void (*)(void)) -1;
__LIBC_HIDDEN__ void do_arm64_start(void* raw_args) {
structors_array_t array;
array.preinit_array = &__PREINIT_ARRAY__;
array.init_array = &__INIT_ARRAY__;
array.fini_array = &__FINI_ARRAY__;
__libc_init(raw_args, NULL, &main, &array);
}
/*
* Put the value of sp in x0 and call do_arm64_init(). The latter will then
* then be able to access the stack as prepared by the kernel's execve system
* call (via the first argument).
*/
__asm__ (
" .text \n"
" .align 2 \n"
" .global _start \n"
" .hidden _start \n"
" .type _start, %function \n"
"_start: \n"
" add x0, sp, xzr \n"
" b do_arm64_start \n"
" .size _start, .-_start \n"
);
#include "../../arch-common/bionic/__dso_handle.h"
#include "../../arch-common/bionic/atexit.h"

View File

@@ -0,0 +1,58 @@
/*
* Copyright (C) 2012 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.
*/
extern void __cxa_finalize(void *);
extern void *__dso_handle;
__attribute__((visibility("hidden"),destructor))
void __on_dlclose() {
__cxa_finalize(&__dso_handle);
}
/* CRT_LEGACY_WORKAROUND should only be defined when building
* this file as part of the platform's C library.
*
* The C library already defines a function named 'atexit()'
* for backwards compatibility with older NDK-generated binaries.
*
* For newer ones, 'atexit' is actually embedded in the C
* runtime objects that are linked into the final ELF
* binary (shared library or executable), and will call
* __cxa_atexit() in order to un-register any atexit()
* handler when a library is unloaded.
*
* This function must be global *and* hidden. Only the
* code inside the same ELF binary should be able to access it.
*/
#ifdef CRT_LEGACY_WORKAROUND
#include "__dso_handle.h"
#else
#include "__dso_handle_so.h"
#include "atexit.h"
#endif

View File

@@ -0,0 +1,50 @@
/*
* 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.
*/
#include "asm_multiarch.h"
.section .preinit_array, "aw"
ASM_PTR_SIZE(0)
.section .init_array, "aw"
ASM_PTR_SIZE(0)
.section .fini_array, "aw"
ASM_PTR_SIZE(0)
#if defined(__linux__) && defined(__ELF__)
.section .note.GNU-stack,"",%progbits
#endif
#if defined(__i386__) || defined(__x86_64__)
.section .eh_frame,"a",@progbits
ASM_ALIGN(4)
.type __FRAME_END__, @object
.size __FRAME_END__, 4
__FRAME_END__:
.zero 4
#endif

View File

@@ -26,18 +26,24 @@
* SUCH DAMAGE.
*/
#ifndef _ARCH_AARCH64_KERNEL_H
#define _ARCH_AARCH64_KERNEL_H
#include "asm_multiarch.h"
/* this file contains kernel-specific definitions that were optimized out of
our processed kernel headers, but still useful nonetheless... */
#ifndef __arm__
.section .init_array, "aw"
ASM_PTR_SIZE(0)
typedef __kernel_ulong_t __kernel_blkcnt_t;
typedef __kernel_ulong_t __kernel_blksize_t;
.section .fini_array, "aw"
ASM_PTR_SIZE(0)
#endif
/* 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_AARCH64_KERNEL_H */
#if defined(__linux__) && defined(__ELF__)
.section .note.GNU-stack,"",%progbits
#endif
#if defined(__i386__) || defined(__x86_64__)
.section .eh_frame,"a",@progbits
ASM_ALIGN(4)
.type __FRAME_END__, @object
.size __FRAME_END__, 4
__FRAME_END__:
.zero 4
#endif

View File

@@ -5,6 +5,7 @@ SHA1Final
SHA1Init
SHA1Transform
SHA1Update
_Exit
_Unwind_Backtrace
_Unwind_DeleteException
_Unwind_FindEnclosingFunction
@@ -190,6 +191,9 @@ __srefill
__srget
__sseek
__stack_chk_fail
__stpcpy_chk
__stpncpy_chk
__stpncpy_chk2
__strcat_chk
__strchr_chk
__strcpy_chk
@@ -229,7 +233,6 @@ __umask_chk
__vfprintf
__vsnprintf_chk
__vsprintf_chk
_cache_get_nameserver_addr
_cleanup
_exit
_exit_with_stack_teardown
@@ -237,35 +240,25 @@ _fwalk
_getlong
_getshort
_longjmp
_resolv_clear_iface_for_pid
_resolv_clear_iface_for_uid_range
_resolv_clear_iface_pid_mapping
_resolv_clear_iface_uid_range_mapping
_resolv_flush_cache_for_default_iface
_resolv_flush_cache_for_iface
_resolv_get_pids_associated_interface
_resolv_get_uids_associated_interface
_resolv_set_addr_of_iface
_resolv_set_default_iface
_resolv_set_iface_for_pid
_resolv_set_iface_for_uid_range
_resolv_set_nameservers_for_iface
_resolv_flush_cache_for_net
_resolv_set_nameservers_for_net
_setjmp
_thread_created_hook
abort
abs
accept
accept4
access
acct
alarm
alphasort
alphasort64
android_getaddrinfoforiface
android_gethostbyaddrforiface
android_gethostbyaddrforiface_proxy
android_gethostbyaddrforiface_real
android_gethostbynameforiface
android_getnameinfoforiface
android_getaddrinfofornet
android_gethostbyaddrfornet
android_gethostbyaddrfornet_proxy
android_gethostbyaddrfornet_real
android_gethostbynamefornet
android_getnameinfofornet
arc4random
arc4random_addrandom
arc4random_buf
@@ -315,6 +308,7 @@ close
closedir
closelog
closelog_r
cmsg_nxthdr
connect
creat
creat64
@@ -356,6 +350,7 @@ drand48
dup
dup2
dup3
duplocale
endmntent
endpwent
endservent
@@ -427,6 +422,7 @@ fread
free
freeaddrinfo
freedtoa
freelocale
fremovexattr
freopen
fscanf
@@ -599,6 +595,7 @@ labs
lchown
ldexp
ldiv
lfind
lgetxattr
link
linkat
@@ -607,6 +604,7 @@ listxattr
llabs
lldiv
llistxattr
localeconv
localtime
localtime64
localtime64_r
@@ -616,6 +614,7 @@ longjmp
longjmperror
lrand48
lremovexattr
lsearch
lseek
lseek64
lsetxattr
@@ -666,6 +665,7 @@ munlock
munlockall
munmap
nanosleep
newlocale
nftw
nftw64
nice
@@ -820,8 +820,8 @@ res_init
res_mkquery
res_query
res_search
res_setiface
res_setmark
res_setnetid
rewind
rewinddir
rmdir
@@ -925,6 +925,8 @@ statfs
statfs64
statvfs
statvfs64
stpcpy
stpncpy
strcasecmp
strcasestr
strcat
@@ -965,7 +967,6 @@ strtol
strtold
strtoll
strtoq
strtotimeval
strtoul
strtoull
strtoumax
@@ -1040,6 +1041,7 @@ unlinkat
unlockpt
unsetenv
unshare
uselocale
usleep
utime
utimensat
@@ -1106,6 +1108,7 @@ wcswcs
wcswidth
wcsxfrm
wctob
wctomb
wctype
wcwidth
wmemchr

View File

@@ -1,14 +1,11 @@
__addtf3
__broken__fpclassify
__broken__isfinitel
__broken__isinfl
__broken__isnanl
__broken__isnormall
__broken_signbitl
__divtf3
__eqtf2
__exp__D
__extendsftf2
__fixtfdi
__fixtfsi
__floatsitf
__fpclassifyd
__fpclassifyf
__fpclassifyl
@@ -29,16 +26,21 @@ __isnormalf
__isnormall
__kernel_cos
__kernel_cosdf
__kernel_cosl
__kernel_rem_pio2
__kernel_sin
__kernel_sindf
__kernel_sinl
__kernel_tan
__kernel_tandf
__kernel_tanl
__ldexp_cexp
__ldexp_cexpf
__ldexp_exp
__ldexp_expf
__letf2
__log__D
__lttf2
__multf3
__netf2
__signbit
@@ -233,7 +235,9 @@ nearbyintl
nextafter
nextafterf
nextafterl
nexttoward
nexttowardf
nexttowardl
pow
powf
powl

View File

@@ -1,2 +1,25 @@
_ItL_aT
_ItL_atanhi
_ItL_atanlo
_ItL_pS0
_ItL_pS1
_ItL_pS2
_ItL_pS3
_ItL_pS4
_ItL_pS5
_ItL_pS6
_ItL_pS7
_ItL_pS8
_ItL_pS9
_ItL_pi_lo
_ItL_qS1
_ItL_qS2
_ItL_qS3
_ItL_qS4
_ItL_qS5
_ItL_qS6
_ItL_qS7
_ItL_qS8
_ItL_qS9
__fe_dfl_env
signgam

View File

@@ -26,74 +26,78 @@
struct siginfo;
#define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int))
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#ifdef __LP64__
#define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))
#endif
#include <asm-generic/siginfo.h>
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
typedef struct siginfo {
int si_signo;
int si_code;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
int si_errno;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
int __pad0[SI_MAX_SIZE / sizeof(int) - SI_PAD_SIZE - 3];
union {
int _pad[SI_PAD_SIZE];
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
struct {
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
pid_t _pid;
__ARCH_SI_UID_T _uid;
} _kill;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
struct {
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
timer_t _tid;
int _overrun;
char _pad[sizeof( __ARCH_SI_UID_T) - sizeof(int)];
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
sigval_t _sigval;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
int _sys_private;
} _timer;
struct {
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
pid_t _pid;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__ARCH_SI_UID_T _uid;
sigval_t _sigval;
} _rt;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
struct {
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
pid_t _pid;
__ARCH_SI_UID_T _uid;
int _status;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
clock_t _utime;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
clock_t _stime;
} _sigchld;
struct {
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
pid_t _pid;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
clock_t _utime;
int _status;
clock_t _stime;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
} _irix_sigchld;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
struct {
void __user *_addr;
#ifdef __ARCH_SI_TRAPNO
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
int _trapno;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#endif
short _addr_lsb;
} _sigfault;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
struct {
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__ARCH_SI_BAND_T _band;
int _fd;
} _sigpoll;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
} _sifields;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
} siginfo_t;
#undef SI_ASYNCIO
#undef SI_TIMER
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#undef SI_MESGQ
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define SI_ASYNCIO -2
#define SI_TIMER __SI_CODE(__SI_TIMER, -3)
#define SI_MESGQ __SI_CODE(__SI_MESGQ, -4)
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#endif
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */

View File

@@ -1,62 +0,0 @@
/* $OpenBSD: limits.h,v 1.5 2007/05/07 20:51:07 kettenis Exp $ */
/*
* Copyright (c) 1988, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. 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.
* 3. Neither the name of the University 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 THE REGENTS 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 REGENTS 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.
*
* @(#)limits.h 8.3 (Berkeley) 1/4/94
*/
#ifndef _MIPS_LIMITS_H_
#define _MIPS_LIMITS_H_
#include <sys/cdefs.h>
#define MB_LEN_MAX 6 /* Allow 31 bit UTF2 */
#ifndef SIZE_MAX
#define SIZE_MAX ULONG_MAX /* max value for a size_t */
#endif
#define SSIZE_MAX LONG_MAX /* max value for a ssize_t */
#if __BSD_VISIBLE
#define SIZE_T_MAX ULONG_MAX /* max value for a size_t (historic) */
/* Quads and longs are the same on mips64 */
#define UQUAD_MAX (ULONG_MAX) /* max value for a uquad_t */
#define QUAD_MAX (LONG_MAX) /* max value for a quad_t */
#define QUAD_MIN (LONG_MIN) /* min value for a quad_t */
#endif /* __BSD_VISIBLE */
#define LONGLONG_BIT 64
#define LONGLONG_MIN (-9223372036854775807LL-1)
#define LONGLONG_MAX 9223372036854775807LL
#define ULONGLONG_MAX 18446744073709551615ULL
#endif /* !_MIPS_LIMITS_H_ */

Binary file not shown.

Binary file not shown.

View File

@@ -1,8 +1,3 @@
/* $OpenBSD: exec.h,v 1.4 2012/09/11 15:44:17 deraadt Exp $ */
/*
* Written by Artur Grabowski <art@openbsd.org> Public Domain
*/
/*
* Copyright (C) 2013 The Android Open Source Project
* All rights reserved.
@@ -31,18 +26,11 @@
* SUCH DAMAGE.
*/
#ifndef _MACHINE_EXEC_H_
#define _MACHINE_EXEC_H_
extern void *__dso_handle;
extern int __cxa_atexit(void (*func)(void *), void *arg, void *dso);
#define __LDPGSZ 4096
#define ARCH_ELFSIZE 64
#define ELF_TARG_CLASS ELFCLASS64
#define ELF_TARG_DATA ELFDATA2LSB
#define ELF_TARG_MACH EM_AARCH64
#define _NLIST_DO_ELF
#define _KERN_DO_ELF64
#endif
__attribute__ ((visibility ("hidden")))
int atexit(void (*func)(void))
{
return (__cxa_atexit((void (*)(void *))func, (void *)0, &__dso_handle));
}

View File

@@ -0,0 +1,94 @@
/*
* 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.
*/
#include "../../bionic/libc_init_common.h"
#include <stddef.h>
#include <stdint.h>
__attribute__ ((section (".preinit_array")))
void (*__PREINIT_ARRAY__)(void) = (void (*)(void)) -1;
__attribute__ ((section (".init_array")))
void (*__INIT_ARRAY__)(void) = (void (*)(void)) -1;
__attribute__ ((section (".fini_array")))
void (*__FINI_ARRAY__)(void) = (void (*)(void)) -1;
__LIBC_HIDDEN__ void do_mips_start(void *raw_args) {
structors_array_t array;
array.preinit_array = &__PREINIT_ARRAY__;
array.init_array = &__INIT_ARRAY__;
array.fini_array = &__FINI_ARRAY__;
__libc_init(raw_args, NULL, &main, &array);
}
/*
* This function prepares the return address with a branch-and-link
* instruction (bal) and then uses a .cpsetup to compute the Global
* Offset Table (GOT) pointer ($gp). The $gp is then used to load
* the address of _do_mips_start() into $t9 just before calling it.
* Terminating the stack with a NULL return address.
*/
__asm__ (
" .set push \n"
" \n"
" .text \n"
" .align 4 \n"
" .type __start,@function \n"
" .globl __start \n"
" .globl _start \n"
" \n"
" .ent __start \n"
"__start: \n"
" _start: \n"
" .frame $sp,32,$0 \n"
" .mask 0x80000000,-8 \n"
" \n"
" move $a0, $sp \n"
" daddiu $sp, $sp, -32 \n"
" \n"
" .set noreorder \n"
" bal 1f \n"
" nop \n"
"1: \n"
" .cpsetup $ra,16,1b \n"
" .set reorder \n"
" \n"
" sd $0, 24($sp) \n"
" jal do_mips_start \n"
" \n"
"2: b 2b \n"
" .end __start \n"
" \n"
" .set pop \n"
);
#include "../../arch-common/bionic/__dso_handle.h"
#include "atexit.h"

View File

@@ -1,5 +1,3 @@
/* $OpenBSD: endian.h,v 1.6 2011/11/08 17:06:51 deraadt Exp $ */
/*
* Copyright (C) 2013 The Android Open Source Project
* All rights reserved.
@@ -28,12 +26,13 @@
* SUCH DAMAGE.
*/
#ifndef __AARCH64_ENDIAN_H_
#define __AARCH64_ENDIAN_H_
extern void __cxa_finalize(void *);
extern void *__dso_handle;
/* FIXME - work in progress */
#define _BYTE_ORDER _LITTLE_ENDIAN
#define __STRICT_ALIGNMENT
#include <sys/endian.h>
__attribute__((visibility("hidden"),destructor))
void __on_dlclose() {
__cxa_finalize(&__dso_handle);
}
#endif /* __AARCH64_ENDIAN_H_ */
#include "__dso_handle_so.h"
#include "atexit.h"

View File

@@ -0,0 +1,53 @@
/*
* 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.
*/
.section .preinit_array, "aw"
.long 0
.section .init_array, "aw"
.long 0
.section .fini_array, "aw"
.long 0
.section .ctors, "aw"
.type __CTOR_END__, @object
__CTOR_END__:
.long 0
.section .dtors, "aw"
.type __DTOR_END__, @object
__DTOR_END__:
.long 0
.section .eh_frame,"a",@progbits
.align 4
.type __FRAME_END__, @object
.size __FRAME_END__, 4
__FRAME_END__:
.zero 4

View File

@@ -0,0 +1,5 @@
.section .init_array, "aw"
.long 0
.section .fini_array, "aw"
.long 0

View File

@@ -5,6 +5,7 @@ SHA1Final
SHA1Init
SHA1Transform
SHA1Update
_Exit
_Unwind_Backtrace
_Unwind_DeleteException
_Unwind_FindEnclosingFunction
@@ -195,6 +196,9 @@ __srefill
__srget
__sseek
__stack_chk_fail
__stpcpy_chk
__stpncpy_chk
__stpncpy_chk2
__strcat_chk
__strchr_chk
__strcpy_chk
@@ -236,7 +240,6 @@ __unpack_t
__vfprintf
__vsnprintf_chk
__vsprintf_chk
_cache_get_nameserver_addr
_cleanup
_exit
_exit_with_stack_teardown
@@ -245,35 +248,25 @@ _fwalk
_getlong
_getshort
_longjmp
_resolv_clear_iface_for_pid
_resolv_clear_iface_for_uid_range
_resolv_clear_iface_pid_mapping
_resolv_clear_iface_uid_range_mapping
_resolv_flush_cache_for_default_iface
_resolv_flush_cache_for_iface
_resolv_get_pids_associated_interface
_resolv_get_uids_associated_interface
_resolv_set_addr_of_iface
_resolv_set_default_iface
_resolv_set_iface_for_pid
_resolv_set_iface_for_uid_range
_resolv_set_nameservers_for_iface
_resolv_flush_cache_for_net
_resolv_set_nameservers_for_net
_setjmp
_thread_created_hook
abort
abs
accept
accept4
access
acct
alarm
alphasort
alphasort64
android_getaddrinfoforiface
android_gethostbyaddrforiface
android_gethostbyaddrforiface_proxy
android_gethostbyaddrforiface_real
android_gethostbynameforiface
android_getnameinfoforiface
android_getaddrinfofornet
android_gethostbyaddrfornet
android_gethostbyaddrfornet_proxy
android_gethostbyaddrfornet_real
android_gethostbynamefornet
android_getnameinfofornet
arc4random
arc4random_addrandom
arc4random_buf
@@ -323,6 +316,7 @@ close
closedir
closelog
closelog_r
cmsg_nxthdr
connect
creat
creat64
@@ -364,6 +358,7 @@ drand48
dup
dup2
dup3
duplocale
endmntent
endpwent
endservent
@@ -435,6 +430,7 @@ fread
free
freeaddrinfo
freedtoa
freelocale
fremovexattr
freopen
fscanf
@@ -607,6 +603,7 @@ labs
lchown
ldexp
ldiv
lfind
lgetxattr
link
linkat
@@ -615,6 +612,7 @@ listxattr
llabs
lldiv
llistxattr
localeconv
localtime
localtime64
localtime64_r
@@ -624,6 +622,7 @@ longjmp
longjmperror
lrand48
lremovexattr
lsearch
lseek
lseek64
lsetxattr
@@ -674,6 +673,7 @@ munlock
munlockall
munmap
nanosleep
newlocale
nftw
nftw64
nice
@@ -828,8 +828,8 @@ res_init
res_mkquery
res_query
res_search
res_setiface
res_setmark
res_setnetid
rewind
rewinddir
rmdir
@@ -933,6 +933,8 @@ statfs
statfs64
statvfs
statvfs64
stpcpy
stpncpy
strcasecmp
strcasestr
strcat
@@ -973,7 +975,6 @@ strtol
strtold
strtoll
strtoq
strtotimeval
strtoul
strtoull
strtoumax
@@ -1048,6 +1049,7 @@ unlinkat
unlockpt
unsetenv
unshare
uselocale
usleep
utime
utimensat
@@ -1114,6 +1116,7 @@ wcswcs
wcswidth
wcsxfrm
wctob
wctomb
wctype
wcwidth
wmemchr

View File

@@ -1,20 +1,22 @@
__addtf3
__ashlti3
__broken__fpclassify
__broken__isfinitel
__broken__isinfl
__broken__isnanl
__broken__isnormall
__broken_signbitl
__divtf3
__eqtf2
__exp__D
__extenddftf2
__extendsftf2
__fixtfdi
__fixtfsi
__fixunstfdi
__fixunstfsi
__floatsitf
__floatunditf
__floatunsitf
__fpclassifyd
__fpclassifyf
__fpclassifyl
__fpcmp_parts_t
__getf2
__gttf2
__ieee754_rem_pio2
__ieee754_rem_pio2f
@@ -31,17 +33,22 @@ __isnormalf
__isnormall
__kernel_cos
__kernel_cosdf
__kernel_cosl
__kernel_rem_pio2
__kernel_sin
__kernel_sindf
__kernel_sinl
__kernel_tan
__kernel_tandf
__kernel_tanl
__ldexp_cexp
__ldexp_cexpf
__ldexp_exp
__ldexp_expf
__letf2
__log__D
__lshrti3
__lttf2
__make_dp
__make_fp
__make_tp
@@ -246,7 +253,9 @@ nearbyintl
nextafter
nextafterf
nextafterl
nexttoward
nexttowardf
nexttowardl
pow
powf
powl

View File

@@ -1,3 +1,26 @@
_ItL_aT
_ItL_atanhi
_ItL_atanlo
_ItL_pS0
_ItL_pS1
_ItL_pS2
_ItL_pS3
_ItL_pS4
_ItL_pS5
_ItL_pS6
_ItL_pS7
_ItL_pS8
_ItL_pS9
_ItL_pi_lo
_ItL_qS1
_ItL_qS2
_ItL_qS3
_ItL_qS4
_ItL_qS5
_ItL_qS6
_ItL_qS7
_ItL_qS8
_ItL_qS9
__fe_dfl_env
__thenan_tf
signgam

View File

@@ -1,5 +1,5 @@
/*-
* Copyright (c) 2004-2005 David Schultz <das@FreeBSD.ORG>
* Copyright (c) 2004-2005 David Schultz <das (at) FreeBSD.ORG>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -22,50 +22,83 @@
* 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.
*
* $FreeBSD: src/lib/msun/i387/fenv.h,v 1.4 2005/03/17 22:21:46 das Exp $
*/
#ifndef _I387_FENV_H_
#define _I387_FENV_H_
#ifndef _AMD64_FENV_H_
#define _AMD64_FENV_H_
#include <sys/types.h>
__BEGIN_DECLS
/*
* To preserve binary compatibility with FreeBSD 5.3, we pack the
* mxcsr into some reserved fields, rather than changing sizeof(fenv_t).
* Each symbol representing a floating point exception expands to an integer
* constant expression with values, such that bitwise-inclusive ORs of _all
* combinations_ of the constants result in distinct values.
*
* We use such values that allow direct bitwise operations on FPU/SSE registers.
*/
typedef struct {
__uint16_t __control;
__uint16_t __mxcsr_hi;
__uint16_t __status;
__uint16_t __mxcsr_lo;
__uint32_t __tag;
char __other[16];
} fenv_t;
typedef __uint16_t fexcept_t;
/* Exception flags */
#define FE_INVALID 0x01
#define FE_DENORMAL 0x02
#define FE_DIVBYZERO 0x04
#define FE_OVERFLOW 0x08
#define FE_UNDERFLOW 0x10
#define FE_INEXACT 0x20
#define FE_ALL_EXCEPT (FE_DIVBYZERO | FE_DENORMAL | FE_INEXACT | \
FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW)
/* Rounding modes */
#define FE_TONEAREST 0x0000
#define FE_DOWNWARD 0x0400
#define FE_UPWARD 0x0800
#define FE_TOWARDZERO 0x0c00
#define _ROUND_MASK (FE_TONEAREST | FE_DOWNWARD | \
FE_UPWARD | FE_TOWARDZERO)
/*
* The following symbol is simply the bitwise-inclusive OR of all floating-point
* exception constants defined above.
*/
#define FE_ALL_EXCEPT (FE_INVALID | FE_DENORMAL | FE_DIVBYZERO | \
FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT)
#define _SSE_MASK_SHIFT 7
/*
* Each symbol representing the rounding direction, expands to an integer
* constant expression whose value is distinct non-negative value.
*
* We use such values that allow direct bitwise operations on FPU/SSE registers.
*/
#define FE_TONEAREST 0x000
#define FE_DOWNWARD 0x400
#define FE_UPWARD 0x800
#define FE_TOWARDZERO 0xc00
/*
* The following symbol is simply the bitwise-inclusive OR of all floating-point
* rounding direction constants defined above.
*/
#define _X87_ROUND_MASK (FE_TONEAREST | FE_DOWNWARD | FE_UPWARD | \
FE_TOWARDZERO)
#define _SSE_ROUND_SHIFT 3
/*
* fenv_t represents the entire floating-point environment.
*/
typedef struct {
struct {
__uint32_t __control; /* Control word register */
__uint32_t __status; /* Status word register */
__uint32_t __tag; /* Tag word register */
__uint32_t __others[4]; /* EIP, Pointer Selector, etc */
} __x87;
__uint32_t __mxcsr; /* Control, status register */
} fenv_t;
/*
* fexcept_t represents the floating-point status flags collectively, including
* any status the implementation associates with the flags.
*
* A floating-point status flag is a system variable whose value is set (but
* never cleared) when a floating-point exception is raised, which occurs as a
* side effect of exceptional floating-point arithmetic to provide auxiliary
* information.
*
* A floating-point control mode is a system variable whose value may be set by
* the user to affect the subsequent behavior of floating-point arithmetic.
*/
typedef __uint32_t fexcept_t;
__END_DECLS
#endif /* !I387_FENV_H_ */
#endif /* !_AMD64_FENV_H_ */

View File

@@ -1,55 +0,0 @@
/* $OpenBSD: limits.h,v 1.5 2009/11/27 19:54:35 guenther Exp $ */
/*
* Copyright (c) 1988 The Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. 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.
* 3. Neither the name of the University 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 THE REGENTS 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 REGENTS 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.
*
* @(#)limits.h 7.2 (Berkeley) 6/28/90
*/
#ifndef _MACHINE_LIMITS_H_
#define _MACHINE_LIMITS_H_
#include <sys/cdefs.h>
#if __POSIX_VISIBLE || __XPG_VISIBLE
#ifndef SIZE_MAX
#define SIZE_MAX ULONG_MAX /* max value for a size_t */
#endif
#define SSIZE_MAX LONG_MAX /* max value for a ssize_t */
#endif
#if __BSD_VISIBLE
#define SIZE_T_MAX ULONG_MAX /* max value for a size_t (historic) */
#define UQUAD_MAX 0xffffffffffffffffULL /* max unsigned quad */
#define QUAD_MAX 0x7fffffffffffffffLL /* max signed quad */
#define QUAD_MIN (-0x7fffffffffffffffLL-1) /* min signed quad */
#endif /* __BSD_VISIBLE */
#endif /* _MACHINE_LIMITS_H_ */

View File

@@ -5,6 +5,7 @@ SHA1Final
SHA1Init
SHA1Transform
SHA1Update
_Exit
_Unwind_Backtrace
_Unwind_DeleteException
_Unwind_FindEnclosingFunction
@@ -190,6 +191,9 @@ __srefill
__srget
__sseek
__stack_chk_fail
__stpcpy_chk
__stpncpy_chk
__stpncpy_chk2
__strcat_chk
__strchr_chk
__strcpy_chk
@@ -229,7 +233,6 @@ __umask_chk
__vfprintf
__vsnprintf_chk
__vsprintf_chk
_cache_get_nameserver_addr
_cleanup
_exit
_exit_with_stack_teardown
@@ -237,35 +240,25 @@ _fwalk
_getlong
_getshort
_longjmp
_resolv_clear_iface_for_pid
_resolv_clear_iface_for_uid_range
_resolv_clear_iface_pid_mapping
_resolv_clear_iface_uid_range_mapping
_resolv_flush_cache_for_default_iface
_resolv_flush_cache_for_iface
_resolv_get_pids_associated_interface
_resolv_get_uids_associated_interface
_resolv_set_addr_of_iface
_resolv_set_default_iface
_resolv_set_iface_for_pid
_resolv_set_iface_for_uid_range
_resolv_set_nameservers_for_iface
_resolv_flush_cache_for_net
_resolv_set_nameservers_for_net
_setjmp
_thread_created_hook
abort
abs
accept
accept4
access
acct
alarm
alphasort
alphasort64
android_getaddrinfoforiface
android_gethostbyaddrforiface
android_gethostbyaddrforiface_proxy
android_gethostbyaddrforiface_real
android_gethostbynameforiface
android_getnameinfoforiface
android_getaddrinfofornet
android_gethostbyaddrfornet
android_gethostbyaddrfornet_proxy
android_gethostbyaddrfornet_real
android_gethostbynamefornet
android_getnameinfofornet
arc4random
arc4random_addrandom
arc4random_buf
@@ -314,6 +307,7 @@ close
closedir
closelog
closelog_r
cmsg_nxthdr
connect
creat
creat64
@@ -355,6 +349,7 @@ drand48
dup
dup2
dup3
duplocale
endmntent
endpwent
endservent
@@ -426,6 +421,7 @@ fread
free
freeaddrinfo
freedtoa
freelocale
fremovexattr
freopen
fscanf
@@ -598,6 +594,7 @@ labs
lchown
ldexp
ldiv
lfind
lgetxattr
link
linkat
@@ -606,6 +603,7 @@ listxattr
llabs
lldiv
llistxattr
localeconv
localtime
localtime64
localtime64_r
@@ -615,6 +613,7 @@ longjmp
longjmperror
lrand48
lremovexattr
lsearch
lseek
lseek64
lsetxattr
@@ -665,6 +664,7 @@ munlock
munlockall
munmap
nanosleep
newlocale
nftw
nftw64
nice
@@ -819,8 +819,8 @@ res_init
res_mkquery
res_query
res_search
res_setiface
res_setmark
res_setnetid
rewind
rewinddir
rmdir
@@ -924,6 +924,8 @@ statfs
statfs64
statvfs
statvfs64
stpcpy
stpncpy
strcasecmp
strcasestr
strcat
@@ -964,7 +966,6 @@ strtol
strtold
strtoll
strtoq
strtotimeval
strtoul
strtoull
strtoumax
@@ -1039,6 +1040,7 @@ unlinkat
unlockpt
unsetenv
unshare
uselocale
usleep
utime
utimensat
@@ -1105,6 +1107,7 @@ wcswcs
wcswidth
wcsxfrm
wctob
wctomb
wctype
wcwidth
wmemchr

View File

@@ -1,15 +1,12 @@
__addtf3
__broken__fpclassify
__broken__isfinitel
__broken__isinfl
__broken__isnanl
__broken__isnormall
__broken_signbitl
__divtf3
__eqtf2
__exp__D
__extenddftf2
__extendsftf2
__fixtfdi
__fixtfsi
__floatsitf
__fpclassifyd
__fpclassifyf
__fpclassifyl
@@ -30,16 +27,21 @@ __isnormalf
__isnormall
__kernel_cos
__kernel_cosdf
__kernel_cosl
__kernel_rem_pio2
__kernel_sin
__kernel_sindf
__kernel_sinl
__kernel_tan
__kernel_tandf
__kernel_tanl
__ldexp_cexp
__ldexp_cexpf
__ldexp_exp
__ldexp_expf
__letf2
__log__D
__lttf2
__multf3
__netf2
__sfp_handle_exceptions
@@ -236,7 +238,9 @@ nearbyintl
nextafter
nextafterf
nextafterl
nexttoward
nexttowardf
nexttowardl
pow
powf
powl

View File

@@ -1,2 +1,25 @@
_ItL_aT
_ItL_atanhi
_ItL_atanlo
_ItL_pS0
_ItL_pS1
_ItL_pS2
_ItL_pS3
_ItL_pS4
_ItL_pS5
_ItL_pS6
_ItL_pS7
_ItL_pS8
_ItL_pS9
_ItL_pi_lo
_ItL_qS1
_ItL_qS2
_ItL_qS3
_ItL_qS4
_ItL_qS5
_ItL_qS6
_ItL_qS7
_ItL_qS8
_ItL_qS9
__fe_dfl_env
signgam

View File

@@ -112,84 +112,89 @@
#define F_GETSIG 11
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#endif
#ifndef __LP64__
#ifndef F_GETLK64
#define F_GETLK64 12
#define F_SETLK64 13
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define F_SETLK64 13
#define F_SETLKW64 14
#endif
#endif
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#ifndef F_SETOWN_EX
#define F_SETOWN_EX 15
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define F_GETOWN_EX 16
#endif
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#ifndef F_GETOWNER_UIDS
#define F_GETOWNER_UIDS 17
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#endif
#define F_OWNER_TID 0
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define F_OWNER_PID 1
#define F_OWNER_PGRP 2
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
struct f_owner_ex {
int type;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__kernel_pid_t pid;
};
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define FD_CLOEXEC 1
#ifndef F_RDLCK
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define F_RDLCK 0
#define F_WRLCK 1
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define F_UNLCK 2
#endif
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#ifndef F_EXLCK
#define F_EXLCK 4
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define F_SHLCK 8
#endif
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define LOCK_SH 1
#define LOCK_EX 2
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define LOCK_NB 4
#define LOCK_UN 8
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define LOCK_MAND 32
#define LOCK_READ 64
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define LOCK_WRITE 128
#define LOCK_RW 192
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define F_LINUX_SPECIFIC_BASE 1024
#ifndef HAVE_ARCH_STRUCT_FLOCK
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#ifndef __ARCH_FLOCK_PAD
#define __ARCH_FLOCK_PAD
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#endif
struct flock {
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
short l_type;
short l_whence;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__kernel_off_t l_start;
__kernel_off_t l_len;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__kernel_pid_t l_pid;
__ARCH_FLOCK_PAD
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
};
#endif
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#ifndef __LP64__
#ifndef HAVE_ARCH_STRUCT_FLOCK64
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#ifndef __ARCH_FLOCK64_PAD
#define __ARCH_FLOCK64_PAD
#endif
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
struct flock64 {
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
short l_type;
short l_whence;
__kernel_loff_t l_start;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__kernel_loff_t l_len;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__kernel_pid_t l_pid;
__ARCH_FLOCK64_PAD
};
#endif
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#endif
#endif

View File

@@ -37,6 +37,20 @@
__BEGIN_DECLS
#ifdef __LP64__
/* LP64 kernels don't have flock64 because their flock is 64-bit. */
struct flock64 {
short l_type;
short l_whence;
off64_t l_start;
off64_t l_len;
pid_t l_pid;
};
#define F_GETLK64 F_GETLK
#define F_SETLK64 F_SETLK
#define F_SETLKW64 F_SETLKW
#endif
#ifndef O_ASYNC
#define O_ASYNC FASYNC
#endif

View File

@@ -105,6 +105,15 @@
#define ULONG_LONG_MAX ULLONG_MAX
#endif
/* BSD compatibility definitions. */
#if __BSD_VISIBLE
#define SIZE_T_MAX ULONG_MAX
#endif /* __BSD_VISIBLE */
#define SSIZE_MAX LONG_MAX
#define MB_LEN_MAX 1 /* No multibyte characters. */
/* New code should use sysconf(_SC_PAGE_SIZE) instead. */
#ifndef PAGE_SIZE
#define PAGE_SIZE 4096

View File

@@ -29,6 +29,7 @@
#define _LOCALE_H_
#include <sys/cdefs.h>
#include <xlocale.h>
__BEGIN_DECLS
@@ -43,15 +44,29 @@ enum {
LC_PAPER = 7,
LC_NAME = 8,
LC_ADDRESS = 9,
LC_TELEPHONE = 10,
LC_MEASUREMENT = 11,
LC_IDENTIFICATION = 12
};
extern char* setlocale(int, const char*);
#define LC_CTYPE_MASK (1 << LC_CTYPE)
#define LC_NUMERIC_MASK (1 << LC_NUMERIC)
#define LC_TIME_MASK (1 << LC_TIME)
#define LC_COLLATE_MASK (1 << LC_COLLATE)
#define LC_MONETARY_MASK (1 << LC_MONETARY)
#define LC_MESSAGES_MASK (1 << LC_MESSAGES)
#define LC_PAPER_MASK (1 << LC_PAPER)
#define LC_NAME_MASK (1 << LC_NAME)
#define LC_ADDRESS_MASK (1 << LC_ADDRESS)
#define LC_TELEPHONE_MASK (1 << LC_TELEPHONE)
#define LC_MEASUREMENT_MASK (1 << LC_MEASUREMENT)
#define LC_IDENTIFICATION_MASK (1 << LC_IDENTIFICATION)
#define LC_ALL_MASK (LC_CTYPE_MASK | LC_NUMERIC_MASK | LC_TIME_MASK | LC_COLLATE_MASK | \
LC_MONETARY_MASK | LC_MESSAGES_MASK | LC_PAPER_MASK | LC_NAME_MASK | \
LC_ADDRESS_MASK | LC_TELEPHONE_MASK | LC_MEASUREMENT_MASK | \
LC_IDENTIFICATION_MASK)
#if defined(__LP64__)
struct lconv {
char* decimal_point;
char* thousands_sep;
@@ -71,7 +86,6 @@ struct lconv {
char n_sep_by_space;
char p_sign_posn;
char n_sign_posn;
/* ISO-C99 */
char int_p_cs_precedes;
char int_p_sep_by_space;
char int_n_cs_precedes;
@@ -79,13 +93,17 @@ struct lconv {
char int_p_sign_posn;
char int_n_sign_posn;
};
#else
// Keep old declaration for ILP32 for compatibility
struct lconv { };
#endif
struct lconv* localeconv(void);
locale_t duplocale(locale_t);
void freelocale(locale_t);
locale_t newlocale(int, const char*, locale_t);
char* setlocale(int, const char*);
locale_t uselocale(locale_t);
#define LC_GLOBAL_LOCALE ((locale_t) -1L)
__END_DECLS
#endif /* _LOCALE_H_ */

View File

@@ -207,13 +207,11 @@ void endprotoent(void);
void endservent(void);
void freehostent(struct hostent *);
struct hostent *gethostbyaddr(const void *, socklen_t, int);
struct hostent *android_gethostbyaddrforiface(const void *, socklen_t, int, const char*, int);
int gethostbyaddr_r(const void *, int, int, struct hostent *, char *, size_t, struct hostent **, int *);
struct hostent *gethostbyname(const char *);
int gethostbyname_r(const char *, struct hostent *, char *, size_t, struct hostent **, int *);
struct hostent *gethostbyname2(const char *, int);
int gethostbyname2_r(const char *, int, struct hostent *, char *, size_t, struct hostent **, int *);
struct hostent *android_gethostbynameforiface(const char *, int, const char *, int);
struct hostent *gethostent(void);
int gethostent_r(struct hostent *, char *, size_t, struct hostent **, int *);
struct hostent *getipnodebyaddr(const void *, size_t, int, int *);
@@ -241,9 +239,7 @@ void sethostent(int);
void setnetent(int);
void setprotoent(int);
int getaddrinfo(const char *, const char *, const struct addrinfo *, struct addrinfo **);
int android_getaddrinfoforiface(const char *, const char *, const struct addrinfo *, const char *, int, struct addrinfo **);
int getnameinfo(const struct sockaddr *, socklen_t, char *, size_t, char *, size_t, int);
int android_getnameinfoforiface(const struct sockaddr *, socklen_t, char *, size_t, char *, size_t, int, const char *, int);
void freeaddrinfo(struct addrinfo *);
const char *gai_strerror(int);
void setnetgrent(const char *);

View File

@@ -10,6 +10,7 @@
#define _SEARCH_H_
#include <sys/cdefs.h>
#include <sys/types.h>
typedef enum {
preorder,
@@ -21,18 +22,22 @@ typedef enum {
#ifdef _SEARCH_PRIVATE
typedef struct node {
char* key;
struct node *llink, *rlink;
struct node* llink;
struct node* rlink;
} node_t;
#endif
__BEGIN_DECLS
void *tdelete(const void * __restrict, void ** __restrict,
int (*)(const void *, const void *));
void *tfind(const void *, void * const *,
int (*)(const void *, const void *));
void* lfind(const void*, const void*, size_t*, size_t, int (*)(const void*, const void*));
void* lsearch(const void*, void*, size_t*, size_t, int (*)(const void*, const void*));
void* tdelete(const void* __restrict, void** __restrict, int (*)(const void*, const void*));
void tdestroy(void*, void (*)(void*));
void* tfind(const void*, void* const*, int (*)(const void*, const void*));
void* tsearch(const void*, void**, int (*)(const void*, const void*));
void twalk(const void*, void (*)(const void*, VISIT, int));
void tdestroy(void *, void (*)(void *));
__END_DECLS
#endif /* !_SEARCH_H_ */

View File

@@ -393,7 +393,7 @@ int vsprintf(char *dest, const char *format, __va_list ap)
}
#if defined(__clang__)
#if !defined(WITH_SYNTAX_CHECK)
#if !defined(snprintf)
#define __wrap_snprintf(dest, size, ...) __builtin___snprintf_chk(dest, size, 0, __bos(dest), __VA_ARGS__)
#define snprintf(...) __wrap_snprintf(__VA_ARGS__)
#endif
@@ -408,7 +408,7 @@ int snprintf(char *dest, size_t size, const char *format, ...)
#endif
#if defined(__clang__)
#if !defined(WITH_SYNTAX_CHECK)
#if !defined(sprintf)
#define __wrap_sprintf(dest, ...) __builtin___sprintf_chk(dest, 0, __bos(dest), __VA_ARGS__)
#define sprintf(...) __wrap_sprintf(__VA_ARGS__)
#endif

View File

@@ -41,8 +41,9 @@ __BEGIN_DECLS
#define EXIT_FAILURE 1
#define EXIT_SUCCESS 0
extern __noreturn void exit(int);
extern __noreturn void abort(void);
extern __noreturn void exit(int);
extern __noreturn void _Exit(int);
extern int atexit(void (*)(void));
extern char *getenv(const char *);
@@ -151,7 +152,6 @@ extern lldiv_t lldiv(long long, long long);
extern const char* getprogname(void);
extern void setprogname(const char*);
#if 1 /* MISSING FROM BIONIC - ENABLED FOR STLPort and libstdc++-v3 */
/* make STLPort happy */
extern int mblen(const char *, size_t);
extern size_t mbstowcs(wchar_t *, const char *, size_t);
@@ -160,7 +160,6 @@ extern int mbtowc(wchar_t *, const char *, size_t);
/* Likewise, make libstdc++-v3 happy. */
extern int wctomb(char *, wchar_t);
extern size_t wcstombs(char *, const wchar_t *, size_t);
#endif /* MISSING */
#define MB_CUR_MAX 1

View File

@@ -53,6 +53,7 @@ extern char* __strrchr_chk(const char *, int, size_t);
extern size_t strlen(const char *) __purefunc;
extern size_t __strlen_chk(const char *, size_t);
extern int strcmp(const char *, const char *) __purefunc;
extern char* stpcpy(char* __restrict, const char* __restrict);
extern char* strcpy(char* __restrict, const char* __restrict);
extern char* strcat(char* __restrict, const char* __restrict);
@@ -72,6 +73,7 @@ extern size_t strnlen(const char *, size_t) __purefunc;
extern char* strncat(char* __restrict, const char* __restrict, size_t);
extern char* strndup(const char *, size_t);
extern int strncmp(const char *, const char *, size_t) __purefunc;
extern char* stpncpy(char* __restrict, const char* __restrict, size_t);
extern char* strncpy(char* __restrict, const char* __restrict, size_t);
extern size_t strlcat(char* __restrict, const char* __restrict, size_t);
@@ -89,8 +91,8 @@ extern size_t strxfrm(char* __restrict, const char* __restrict, size_t);
#if defined(__BIONIC_FORTIFY)
__errordecl(__memcpy_dest_size_error, "memcpy called with size bigger than destination");
__errordecl(__memcpy_src_size_error, "memcpy called with size bigger than source");
__errordecl(__memcpy_dest_size_error, "memcpy: prevented write past end of buffer");
__errordecl(__memcpy_src_size_error, "memcpy: prevented read past end of buffer");
__BIONIC_FORTIFY_INLINE
void* memcpy(void* __restrict dest, const void* __restrict src, size_t copy_amount) {
@@ -115,12 +117,44 @@ void* memmove(void *dest, const void *src, size_t len) {
return __builtin___memmove_chk(dest, src, len, __bos0(dest));
}
__BIONIC_FORTIFY_INLINE
char* stpcpy(char* __restrict dest, const char* __restrict src) {
return __builtin___stpcpy_chk(dest, src, __bos(dest));
}
__BIONIC_FORTIFY_INLINE
char* strcpy(char* __restrict dest, const char* __restrict src) {
return __builtin___strcpy_chk(dest, src, __bos(dest));
}
__errordecl(__strncpy_error, "strncpy called with size bigger than buffer");
__errordecl(__stpncpy_error, "stpncpy: prevented write past end of buffer");
extern char* __stpncpy_chk2(char* __restrict, const char* __restrict, size_t, size_t, size_t);
__BIONIC_FORTIFY_INLINE
char* stpncpy(char* __restrict dest, const char* __restrict src, size_t n) {
size_t bos_dest = __bos(dest);
size_t bos_src = __bos(src);
if (__builtin_constant_p(n) && (n > bos_dest)) {
__stpncpy_error();
}
if (bos_src == __BIONIC_FORTIFY_UNKNOWN_SIZE) {
return __builtin___stpncpy_chk(dest, src, n, bos_dest);
}
if (__builtin_constant_p(n) && (n <= bos_src)) {
return __builtin___stpncpy_chk(dest, src, n, bos_dest);
}
size_t slen = __builtin_strlen(src);
if (__builtin_constant_p(slen)) {
return __builtin___stpncpy_chk(dest, src, n, bos_dest);
}
return __stpncpy_chk2(dest, src, n, bos_dest, bos_src);
}
__errordecl(__strncpy_error, "strncpy: prevented write past end of buffer");
extern char* __strncpy_chk2(char* __restrict, const char* __restrict, size_t, size_t, size_t);
__BIONIC_FORTIFY_INLINE
@@ -164,7 +198,7 @@ void* memset(void *s, int c, size_t n) {
extern size_t __strlcpy_real(char* __restrict, const char* __restrict, size_t)
__asm__(__USER_LABEL_PREFIX__ "strlcpy");
__errordecl(__strlcpy_error, "strlcpy called with size bigger than buffer");
__errordecl(__strlcpy_error, "strlcpy: prevented write past end of buffer");
extern size_t __strlcpy_chk(char *, const char *, size_t, size_t);
__BIONIC_FORTIFY_INLINE
@@ -195,7 +229,7 @@ size_t strlcpy(char* __restrict dest, const char* __restrict src, size_t size) {
extern size_t __strlcat_real(char* __restrict, const char* __restrict, size_t)
__asm__(__USER_LABEL_PREFIX__ "strlcat");
__errordecl(__strlcat_error, "strlcat called with size bigger than buffer");
__errordecl(__strlcat_error, "strlcat: prevented write past end of buffer");
extern size_t __strlcat_chk(char* __restrict, const char* __restrict, size_t, size_t);
@@ -244,7 +278,6 @@ size_t strlen(const char *s) {
return __strlen_chk(s, bos);
}
#if !defined(HAS_STRCHR)
__BIONIC_FORTIFY_INLINE
char* strchr(const char *s, int c) {
size_t bos = __bos(s);
@@ -263,7 +296,6 @@ char* strchr(const char *s, int c) {
return __strchr_chk(s, c, bos);
}
#endif
__BIONIC_FORTIFY_INLINE
char* strrchr(const char *s, int c) {

View File

@@ -528,6 +528,13 @@
#define __BIONIC__ 1
#include <android/api-level.h>
/* glibc compatibility. */
#if __LP64__
#define __WORDSIZE 64
#else
#define __WORDSIZE 32
#endif
/*
* When _FORTIFY_SOURCE is defined, automatic bounds checking is
* added to commonly used libc functions. If a buffer overrun is

View File

@@ -31,9 +31,6 @@
/* Common definitions for limits.h. */
/* Legacy */
#include <machine/limits.h>
#define CHAR_BIT 8 /* number of bits in a char */
#define SCHAR_MAX 0x7f /* max value for a signed char */

View File

@@ -34,16 +34,6 @@
#define MAXPATHLEN PATH_MAX
#define MAXSYMLINKS 8
#if __LP64__
#define ALIGNBYTES 7
#else
#define ALIGNBYTES 3
#endif
#ifndef ALIGN
#define ALIGN(p) (((uintptr_t)(p) + ALIGNBYTES) &~ ALIGNBYTES)
#endif
/* Macros for counting and rounding. */
#ifndef howmany
#define howmany(x, y) (((x)+((y)-1))/(y))

View File

@@ -107,36 +107,17 @@ struct cmsghdr {
int cmsg_type;
};
#define __CMSG_NXTHDR(ctl, len, cmsg) __cmsg_nxthdr((ctl),(len),(cmsg))
#define CMSG_NXTHDR(mhdr, cmsg) cmsg_nxthdr((mhdr), (cmsg))
#define CMSG_ALIGN(len) ( ((len)+sizeof(long)-1) & ~(sizeof(long)-1) )
#define CMSG_DATA(cmsg) ((void*)((char*)(cmsg) + CMSG_ALIGN(sizeof(struct cmsghdr))))
#define CMSG_SPACE(len) (CMSG_ALIGN(sizeof(struct cmsghdr)) + CMSG_ALIGN(len))
#define CMSG_LEN(len) (CMSG_ALIGN(sizeof(struct cmsghdr)) + (len))
#define __CMSG_FIRSTHDR(ctl,len) ((len) >= sizeof(struct cmsghdr) ? (struct cmsghdr*)(ctl) : (struct cmsghdr*)NULL)
#define CMSG_FIRSTHDR(msg) __CMSG_FIRSTHDR((msg)->msg_control, (msg)->msg_controllen)
#define CMSG_FIRSTHDR(msg) \
((msg)->msg_controllen >= sizeof(struct cmsghdr) \
? (struct cmsghdr*) (msg)->msg_control : (struct cmsghdr*) NULL)
#define CMSG_OK(mhdr, cmsg) ((cmsg)->cmsg_len >= sizeof(struct cmsghdr) && (cmsg)->cmsg_len <= (unsigned long) ((mhdr)->msg_controllen - ((char*)(cmsg) - (char*)(mhdr)->msg_control)))
#ifdef __GNUC__
#define __KINLINE static __inline__
#elif defined(__cplusplus)
#define __KINLINE static inline
#else
#define __KINLINE static
#endif
__KINLINE struct cmsghdr* __cmsg_nxthdr(void* __ctl, size_t __size, struct cmsghdr* __cmsg) {
struct cmsghdr* __ptr;
__ptr = (struct cmsghdr*)(((unsigned char*) __cmsg) + CMSG_ALIGN(__cmsg->cmsg_len));
if ((unsigned long)((char*)(__ptr+1) - (char*) __ctl) > __size) {
return NULL;
}
return __ptr;
}
__KINLINE struct cmsghdr* cmsg_nxthdr (struct msghdr* __msg, struct cmsghdr* __cmsg) {
return __cmsg_nxthdr(__msg->msg_control, __msg->msg_controllen, __cmsg);
}
struct cmsghdr* cmsg_nxthdr(struct msghdr*, struct cmsghdr*);
#define SCM_RIGHTS 0x01
#define SCM_CREDENTIALS 0x02
@@ -288,6 +269,7 @@ struct ucred {
#endif
__socketcall int accept(int, struct sockaddr*, socklen_t*);
__socketcall int accept4(int, struct sockaddr*, socklen_t*, int);
__socketcall int bind(int, const struct sockaddr*, int);
__socketcall int connect(int, const struct sockaddr*, socklen_t);
__socketcall int getpeername(int, struct sockaddr*, socklen_t*);

View File

@@ -47,5 +47,8 @@
#define SYS_GETSOCKOPT 15 /* sys_getsockopt(2) */
#define SYS_SENDMSG 16 /* sys_sendmsg(2) */
#define SYS_RECVMSG 17 /* sys_recvmsg(2) */
#define SYS_ACCEPT4 18 /* sys_accept4(2) */
#define SYS_RECVMMSG 19 /* sys_recvmmsg(2) */
#define SYS_SENDMMSG 20 /* sys_sendmmsg(2) */
#endif /* _SYS_SOCKETCALLS_H_ */

View File

@@ -86,6 +86,7 @@ typedef struct ucontext {
struct ucontext *uc_link;
stack_t uc_stack;
sigset_t uc_sigmask;
char __padding[128 - sizeof(sigset_t)];
mcontext_t uc_mcontext;
} ucontext_t;
@@ -242,7 +243,7 @@ typedef struct user_i387_struct* fpregset_t;
typedef struct {
gregset_t gregs;
fpregset_t fpregs;
/* TODO: reserved space? */
unsigned long __reserved1[8];
} mcontext_t;
typedef struct ucontext {

View File

@@ -165,6 +165,10 @@ struct user {
};
#elif defined(__mips__)
struct user_regs_struct
{
unsigned long a[180];
};
struct user {
unsigned long regs[180 / sizeof(unsigned long) + 64];

View File

@@ -61,8 +61,6 @@ struct tm {
extern time_t time(time_t*);
extern int nanosleep(const struct timespec*, struct timespec*);
extern char* strtotimeval(const char*, struct timeval*);
extern char* asctime(const struct tm*);
extern char* asctime_r(const struct tm*, char*);

View File

@@ -36,13 +36,6 @@
#include <time.h>
#include <malloc.h>
/* IMPORTANT: Any code that relies on wide character support is essentially
* non-portable and/or broken. the only reason this header exist
* is because I'm really a nice guy. However, I'm not nice enough
* to provide you with a real implementation. instead wchar_t == char
* and all wc functions are stubs to their "normal" equivalent...
*/
__BEGIN_DECLS
typedef __WINT_TYPE__ wint_t;
@@ -150,12 +143,11 @@ extern int wscanf(const wchar_t *, ...);
extern size_t wcslcat(wchar_t*, const wchar_t*, size_t);
extern size_t wcslcpy(wchar_t*, const wchar_t*, size_t);
/* No really supported. These are just for making libstdc++-v3 happy. */
typedef void *wctrans_t;
extern wint_t towctrans(wint_t, wctrans_t);
extern wctrans_t wctrans(const char*);
#if _XOPEN_SOURCE >= 700 || _POSIX_C_SOURCE >= 200809L
#if __POSIX_VISIBLE >= 200809
wchar_t* wcsdup(const wchar_t*);
size_t wcsnlen(const wchar_t*, size_t);
#endif

View File

@@ -0,0 +1,36 @@
/*
* 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 _XLOCALE_H_
#define _XLOCALE_H_
/* If we just use void* here, GCC exposes that in error messages. */
struct __locale_t;
typedef struct __locale_t* locale_t;
#endif /* _XLOCALE_H_ */

View File

@@ -1,25 +0,0 @@
/****************************************************************************
****************************************************************************
***
*** This header was automatically generated from a Linux kernel header
*** of the same name, to make information necessary for userspace to
*** call into the kernel available to libc. It contains only constants,
*** structures, and macros generated from the original header, and thus,
*** contains no copyrightable information.
***
*** To edit the content of this header, modify the corresponding
*** source file (e.g. under external/kernel-headers/original/) then
*** run bionic/libc/kernel/tools/update_all.py
***
*** Any manual change here will be lost the next time this script will
*** be run. You've been warned!
***
****************************************************************************
****************************************************************************/
#ifndef _UAPI__ASM_GENERIC_BITS_PER_LONG
#define _UAPI__ASM_GENERIC_BITS_PER_LONG
#ifndef __BITS_PER_LONG
#define __BITS_PER_LONG 32
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#endif
#endif

View File

@@ -1,41 +0,0 @@
/****************************************************************************
****************************************************************************
***
*** This header was automatically generated from a Linux kernel header
*** of the same name, to make information necessary for userspace to
*** call into the kernel available to libc. It contains only constants,
*** structures, and macros generated from the original header, and thus,
*** contains no copyrightable information.
***
*** To edit the content of this header, modify the corresponding
*** source file (e.g. under external/kernel-headers/original/) then
*** run bionic/libc/kernel/tools/update_all.py
***
*** Any manual change here will be lost the next time this script will
*** be run. You've been warned!
***
****************************************************************************
****************************************************************************/
#ifndef _UAPI_ASM_GENERIC_INT_LL64_H
#define _UAPI_ASM_GENERIC_INT_LL64_H
#include <asm/bitsperlong.h>
#ifndef __ASSEMBLY__
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
typedef __signed__ char __s8;
typedef unsigned char __u8;
typedef __signed__ short __s16;
typedef unsigned short __u16;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
typedef __signed__ int __s32;
typedef unsigned int __u32;
#ifdef __GNUC__
__extension__ typedef __signed__ long long __s64;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__extension__ typedef unsigned long long __u64;
#else
typedef __signed__ long long __s64;
typedef unsigned long long __u64;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#endif
#endif
#endif

View File

@@ -1,100 +0,0 @@
/****************************************************************************
****************************************************************************
***
*** This header was automatically generated from a Linux kernel header
*** of the same name, to make information necessary for userspace to
*** call into the kernel available to libc. It contains only constants,
*** structures, and macros generated from the original header, and thus,
*** contains no copyrightable information.
***
*** To edit the content of this header, modify the corresponding
*** source file (e.g. under external/kernel-headers/original/) then
*** run bionic/libc/kernel/tools/update_all.py
***
*** Any manual change here will be lost the next time this script will
*** be run. You've been warned!
***
****************************************************************************
****************************************************************************/
#ifndef __ASM_GENERIC_POSIX_TYPES_H
#define __ASM_GENERIC_POSIX_TYPES_H
#include <asm/bitsperlong.h>
#ifndef __kernel_long_t
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
typedef long __kernel_long_t;
typedef unsigned long __kernel_ulong_t;
#endif
#ifndef __kernel_ino_t
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
typedef __kernel_ulong_t __kernel_ino_t;
#endif
#ifndef __kernel_mode_t
typedef unsigned int __kernel_mode_t;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#endif
#ifndef __kernel_pid_t
typedef int __kernel_pid_t;
#endif
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#ifndef __kernel_ipc_pid_t
typedef int __kernel_ipc_pid_t;
#endif
#ifndef __kernel_uid_t
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
typedef unsigned int __kernel_uid_t;
typedef unsigned int __kernel_gid_t;
#endif
#ifndef __kernel_suseconds_t
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
typedef __kernel_long_t __kernel_suseconds_t;
#endif
#ifndef __kernel_daddr_t
typedef int __kernel_daddr_t;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#endif
#ifndef __kernel_uid32_t
typedef unsigned int __kernel_uid32_t;
typedef unsigned int __kernel_gid32_t;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#endif
#ifndef __kernel_old_uid_t
typedef __kernel_uid_t __kernel_old_uid_t;
typedef __kernel_gid_t __kernel_old_gid_t;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#endif
#ifndef __kernel_old_dev_t
typedef unsigned int __kernel_old_dev_t;
#endif
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#ifndef __kernel_size_t
#if __BITS_PER_LONG != 64
typedef unsigned int __kernel_size_t;
typedef int __kernel_ssize_t;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
typedef int __kernel_ptrdiff_t;
#else
typedef __kernel_ulong_t __kernel_size_t;
typedef __kernel_long_t __kernel_ssize_t;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
typedef __kernel_long_t __kernel_ptrdiff_t;
#endif
#endif
#ifndef __kernel_fsid_t
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
typedef struct {
int val[2];
} __kernel_fsid_t;
#endif
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
typedef __kernel_long_t __kernel_off_t;
typedef long long __kernel_loff_t;
typedef __kernel_long_t __kernel_time_t;
typedef __kernel_long_t __kernel_clock_t;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
typedef int __kernel_timer_t;
typedef int __kernel_clockid_t;
typedef char * __kernel_caddr_t;
typedef unsigned short __kernel_uid16_t;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
typedef unsigned short __kernel_gid16_t;
#endif

View File

@@ -1,45 +0,0 @@
/****************************************************************************
****************************************************************************
***
*** This header was automatically generated from a Linux kernel header
*** of the same name, to make information necessary for userspace to
*** call into the kernel available to libc. It contains only constants,
*** structures, and macros generated from the original header, and thus,
*** contains no copyrightable information.
***
*** To edit the content of this header, modify the corresponding
*** source file (e.g. under external/kernel-headers/original/) then
*** run bionic/libc/kernel/tools/update_all.py
***
*** Any manual change here will be lost the next time this script will
*** be run. You've been warned!
***
****************************************************************************
****************************************************************************/
#ifndef __ASM_GENERIC_SIGNAL_DEFS_H
#define __ASM_GENERIC_SIGNAL_DEFS_H
#include <linux/compiler.h>
#ifndef SIG_BLOCK
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define SIG_BLOCK 0
#endif
#ifndef SIG_UNBLOCK
#define SIG_UNBLOCK 1
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#endif
#ifndef SIG_SETMASK
#define SIG_SETMASK 2
#endif
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#ifndef __ASSEMBLY__
typedef void __signalfn_t(int);
typedef __signalfn_t __user *__sighandler_t;
typedef void __restorefn_t(void);
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
typedef __restorefn_t __user *__sigrestore_t;
#define SIG_DFL ((__force __sighandler_t)0)
#define SIG_IGN ((__force __sighandler_t)1)
#define SIG_ERR ((__force __sighandler_t)-1)
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#endif
#endif

View File

@@ -1,116 +0,0 @@
/****************************************************************************
****************************************************************************
***
*** This header was automatically generated from a Linux kernel header
*** of the same name, to make information necessary for userspace to
*** call into the kernel available to libc. It contains only constants,
*** structures, and macros generated from the original header, and thus,
*** contains no copyrightable information.
***
*** To edit the content of this header, modify the corresponding
*** source file (e.g. under external/kernel-headers/original/) then
*** run bionic/libc/kernel/tools/update_all.py
***
*** Any manual change here will be lost the next time this script will
*** be run. You've been warned!
***
****************************************************************************
****************************************************************************/
#ifndef _UAPI__ASM_GENERIC_SIGNAL_H
#define _UAPI__ASM_GENERIC_SIGNAL_H
#include <linux/types.h>
#define _NSIG 64
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define _NSIG_BPW __BITS_PER_LONG
#define _NSIG_WORDS (_NSIG / _NSIG_BPW)
#define SIGHUP 1
#define SIGINT 2
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define SIGQUIT 3
#define SIGILL 4
#define SIGTRAP 5
#define SIGABRT 6
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define SIGIOT 6
#define SIGBUS 7
#define SIGFPE 8
#define SIGKILL 9
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define SIGUSR1 10
#define SIGSEGV 11
#define SIGUSR2 12
#define SIGPIPE 13
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define SIGALRM 14
#define SIGTERM 15
#define SIGSTKFLT 16
#define SIGCHLD 17
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define SIGCONT 18
#define SIGSTOP 19
#define SIGTSTP 20
#define SIGTTIN 21
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define SIGTTOU 22
#define SIGURG 23
#define SIGXCPU 24
#define SIGXFSZ 25
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define SIGVTALRM 26
#define SIGPROF 27
#define SIGWINCH 28
#define SIGIO 29
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define SIGPOLL SIGIO
#define SIGPWR 30
#define SIGSYS 31
#define SIGUNUSED 31
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define SIGRTMIN 32
#ifndef SIGRTMAX
#define SIGRTMAX _NSIG
#endif
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define SA_NOCLDSTOP 0x00000001
#define SA_NOCLDWAIT 0x00000002
#define SA_SIGINFO 0x00000004
#define SA_ONSTACK 0x08000000
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define SA_RESTART 0x10000000
#define SA_NODEFER 0x40000000
#define SA_RESETHAND 0x80000000
#define SA_NOMASK SA_NODEFER
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define SA_ONESHOT SA_RESETHAND
#define MINSIGSTKSZ 2048
#define SIGSTKSZ 8192
#ifndef __ASSEMBLY__
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
typedef struct {
unsigned long sig[_NSIG_WORDS];
} sigset_t;
typedef unsigned long old_sigset_t;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#include <asm-generic/signal-defs.h>
#ifdef SA_RESTORER
#define __ARCH_HAS_SA_RESTORER
#endif
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
struct sigaction {
__sighandler_t sa_handler;
unsigned long sa_flags;
#ifdef SA_RESTORER
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__sigrestore_t sa_restorer;
#endif
sigset_t sa_mask;
};
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
typedef struct sigaltstack {
void __user *ss_sp;
int ss_flags;
size_t ss_size;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
} stack_t;
#endif
#endif

View File

@@ -1,23 +0,0 @@
/****************************************************************************
****************************************************************************
***
*** This header was automatically generated from a Linux kernel header
*** of the same name, to make information necessary for userspace to
*** call into the kernel available to libc. It contains only constants,
*** structures, and macros generated from the original header, and thus,
*** contains no copyrightable information.
***
*** To edit the content of this header, modify the corresponding
*** source file (e.g. under external/kernel-headers/original/) then
*** run bionic/libc/kernel/tools/update_all.py
***
*** Any manual change here will be lost the next time this script will
*** be run. You've been warned!
***
****************************************************************************
****************************************************************************/
#ifndef _ASM_GENERIC_TYPES_H
#define _ASM_GENERIC_TYPES_H
#include <asm-generic/int-ll64.h>
#endif
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */

View File

@@ -1,24 +0,0 @@
/****************************************************************************
****************************************************************************
***
*** This header was automatically generated from a Linux kernel header
*** of the same name, to make information necessary for userspace to
*** call into the kernel available to libc. It contains only constants,
*** structures, and macros generated from the original header, and thus,
*** contains no copyrightable information.
***
*** To edit the content of this header, modify the corresponding
*** source file (e.g. under external/kernel-headers/original/) then
*** run bionic/libc/kernel/tools/update_all.py
***
*** Any manual change here will be lost the next time this script will
*** be run. You've been warned!
***
****************************************************************************
****************************************************************************/
#ifndef __ASM_BITSPERLONG_H
#define __ASM_BITSPERLONG_H
#define __BITS_PER_LONG 64
#include <asm-generic/bitsperlong.h>
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#endif

View File

@@ -1,19 +0,0 @@
/****************************************************************************
****************************************************************************
***
*** This header was automatically generated from a Linux kernel header
*** of the same name, to make information necessary for userspace to
*** call into the kernel available to libc. It contains only constants,
*** structures, and macros generated from the original header, and thus,
*** contains no copyrightable information.
***
*** To edit the content of this header, modify the corresponding
*** source file (e.g. under external/kernel-headers/original/) then
*** run bionic/libc/kernel/tools/update_all.py
***
*** Any manual change here will be lost the next time this script will
*** be run. You've been warned!
***
****************************************************************************
****************************************************************************/
#include <asm-generic/errno.h>

View File

@@ -1,28 +0,0 @@
/****************************************************************************
****************************************************************************
***
*** This header was automatically generated from a Linux kernel header
*** of the same name, to make information necessary for userspace to
*** call into the kernel available to libc. It contains only constants,
*** structures, and macros generated from the original header, and thus,
*** contains no copyrightable information.
***
*** To edit the content of this header, modify the corresponding
*** source file (e.g. under external/kernel-headers/original/) then
*** run bionic/libc/kernel/tools/update_all.py
***
*** Any manual change here will be lost the next time this script will
*** be run. You've been warned!
***
****************************************************************************
****************************************************************************/
#ifndef __ASM_FCNTL_H
#define __ASM_FCNTL_H
#define O_DIRECTORY 040000
#define O_NOFOLLOW 0100000
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define O_DIRECT 0200000
#define O_LARGEFILE 0400000
#include <asm-generic/fcntl.h>
#endif
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */

View File

@@ -1,19 +0,0 @@
/****************************************************************************
****************************************************************************
***
*** This header was automatically generated from a Linux kernel header
*** of the same name, to make information necessary for userspace to
*** call into the kernel available to libc. It contains only constants,
*** structures, and macros generated from the original header, and thus,
*** contains no copyrightable information.
***
****************************************************************************
****************************************************************************/
#ifndef _ASMARM_PAGE_H
#define _ASMARM_PAGE_H
#define PAGE_SHIFT 12
#define PAGE_SIZE (1UL << PAGE_SHIFT)
#define PAGE_MASK (~(PAGE_SIZE-1))
#endif

View File

@@ -1,19 +0,0 @@
/****************************************************************************
****************************************************************************
***
*** This header was automatically generated from a Linux kernel header
*** of the same name, to make information necessary for userspace to
*** call into the kernel available to libc. It contains only constants,
*** structures, and macros generated from the original header, and thus,
*** contains no copyrightable information.
***
*** To edit the content of this header, modify the corresponding
*** source file (e.g. under external/kernel-headers/original/) then
*** run bionic/libc/kernel/tools/update_all.py
***
*** Any manual change here will be lost the next time this script will
*** be run. You've been warned!
***
****************************************************************************
****************************************************************************/
#include <asm-generic/posix_types.h>

View File

@@ -1,46 +0,0 @@
/****************************************************************************
****************************************************************************
***
*** This header was automatically generated from a Linux kernel header
*** of the same name, to make information necessary for userspace to
*** call into the kernel available to libc. It contains only constants,
*** structures, and macros generated from the original header, and thus,
*** contains no copyrightable information.
***
*** To edit the content of this header, modify the corresponding
*** source file (e.g. under external/kernel-headers/original/) then
*** run bionic/libc/kernel/tools/update_all.py
***
*** Any manual change here will be lost the next time this script will
*** be run. You've been warned!
***
****************************************************************************
****************************************************************************/
#ifndef _UAPI__ASM_SIGCONTEXT_H
#define _UAPI__ASM_SIGCONTEXT_H
#include <linux/types.h>
struct sigcontext {
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__u64 fault_address;
__u64 regs[31];
__u64 sp;
__u64 pc;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__u64 pstate;
__u8 __reserved[4096] __attribute__((__aligned__(16)));
};
struct _aarch64_ctx {
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__u32 magic;
__u32 size;
};
#define FPSIMD_MAGIC 0x46508001
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
struct fpsimd_context {
struct _aarch64_ctx head;
__u32 fpsr;
__u32 fpcr;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__uint128_t vregs[32];
};
#endif

View File

@@ -1,24 +0,0 @@
/****************************************************************************
****************************************************************************
***
*** This header was automatically generated from a Linux kernel header
*** of the same name, to make information necessary for userspace to
*** call into the kernel available to libc. It contains only constants,
*** structures, and macros generated from the original header, and thus,
*** contains no copyrightable information.
***
*** To edit the content of this header, modify the corresponding
*** source file (e.g. under external/kernel-headers/original/) then
*** run bionic/libc/kernel/tools/update_all.py
***
*** Any manual change here will be lost the next time this script will
*** be run. You've been warned!
***
****************************************************************************
****************************************************************************/
#ifndef __ASM_SIGINFO_H
#define __ASM_SIGINFO_H
#define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))
#include <asm-generic/siginfo.h>
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#endif

View File

@@ -1,24 +0,0 @@
/****************************************************************************
****************************************************************************
***
*** This header was automatically generated from a Linux kernel header
*** of the same name, to make information necessary for userspace to
*** call into the kernel available to libc. It contains only constants,
*** structures, and macros generated from the original header, and thus,
*** contains no copyrightable information.
***
*** To edit the content of this header, modify the corresponding
*** source file (e.g. under external/kernel-headers/original/) then
*** run bionic/libc/kernel/tools/update_all.py
***
*** Any manual change here will be lost the next time this script will
*** be run. You've been warned!
***
****************************************************************************
****************************************************************************/
#ifndef __ASM_SIGNAL_H
#define __ASM_SIGNAL_H
#define SA_RESTORER 0x04000000
#include <asm-generic/signal.h>
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#endif

View File

@@ -1,19 +0,0 @@
/****************************************************************************
****************************************************************************
***
*** This header was automatically generated from a Linux kernel header
*** of the same name, to make information necessary for userspace to
*** call into the kernel available to libc. It contains only constants,
*** structures, and macros generated from the original header, and thus,
*** contains no copyrightable information.
***
*** To edit the content of this header, modify the corresponding
*** source file (e.g. under external/kernel-headers/original/) then
*** run bionic/libc/kernel/tools/update_all.py
***
*** Any manual change here will be lost the next time this script will
*** be run. You've been warned!
***
****************************************************************************
****************************************************************************/
#include <asm-generic/types.h>

View File

@@ -1,139 +0,0 @@
/* $OpenBSD: _types.h,v 1.13 2013/07/05 19:46:27 guenther Exp $ */
/*
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. 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.
* 3. Neither the name of the University 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 THE REGENTS 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 REGENTS 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.
*
* @(#)types.h 8.3 (Berkeley) 1/5/94
* @(#)ansi.h 8.2 (Berkeley) 1/4/94
*/
#ifndef _MACHINE__TYPES_H_
#define _MACHINE__TYPES_H_
/*
* _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned
* value for all data types (int, long, ...). The result is an
* unsigned long and must be cast to any desired pointer type.
*
* _ALIGNED_POINTER is a boolean macro that checks whether an address
* is valid to fetch data elements of type t from on this architecture.
* This does not reflect the optimal alignment, just the possibility
* (within reasonable limits).
*/
#define _ALIGNBYTES (sizeof(long) - 1)
#define _ALIGN(p) (((unsigned long)(p) + _ALIGNBYTES) &~_ALIGNBYTES)
#define _ALIGNED_POINTER(p,t) 1
#if defined(_KERNEL)
typedef struct label_t {
long val[8];
} label_t;
#endif
/* 7.18.1.1 Exact-width integer types */
typedef __signed char __int8_t;
typedef unsigned char __uint8_t;
typedef short __int16_t;
typedef unsigned short __uint16_t;
typedef int __int32_t;
typedef unsigned int __uint32_t;
/* LONGLONG */
typedef long long __int64_t;
/* LONGLONG */
typedef unsigned long long __uint64_t;
/* 7.18.1.2 Minimum-width integer types */
typedef __int8_t __int_least8_t;
typedef __uint8_t __uint_least8_t;
typedef __int16_t __int_least16_t;
typedef __uint16_t __uint_least16_t;
typedef __int32_t __int_least32_t;
typedef __uint32_t __uint_least32_t;
typedef __int64_t __int_least64_t;
typedef __uint64_t __uint_least64_t;
/* 7.18.1.3 Fastest minimum-width integer types */
typedef __int32_t __int_fast8_t;
typedef __uint32_t __uint_fast8_t;
typedef __int32_t __int_fast16_t;
typedef __uint32_t __uint_fast16_t;
typedef __int32_t __int_fast32_t;
typedef __uint32_t __uint_fast32_t;
typedef __int64_t __int_fast64_t;
typedef __uint64_t __uint_fast64_t;
#define __INT_FAST8_MIN INT32_MIN
#define __INT_FAST16_MIN INT32_MIN
#define __INT_FAST32_MIN INT32_MIN
#define __INT_FAST64_MIN INT64_MIN
#define __INT_FAST8_MAX INT32_MAX
#define __INT_FAST16_MAX INT32_MAX
#define __INT_FAST32_MAX INT32_MAX
#define __INT_FAST64_MAX INT64_MAX
#define __UINT_FAST8_MAX UINT32_MAX
#define __UINT_FAST16_MAX UINT32_MAX
#define __UINT_FAST32_MAX UINT32_MAX
#define __UINT_FAST64_MAX UINT64_MAX
/* 7.18.1.4 Integer types capable of holding object pointers */
typedef long __intptr_t;
typedef unsigned long __uintptr_t;
/* 7.18.1.5 Greatest-width integer types */
typedef __int64_t __intmax_t;
typedef __uint64_t __uintmax_t;
/* Register size */
typedef long __register_t;
/* VM system types */
typedef unsigned long __vaddr_t;
typedef unsigned long __paddr_t;
typedef unsigned long __vsize_t;
typedef unsigned long __psize_t;
/* Standard system types */
typedef double __double_t;
typedef float __float_t;
typedef long __ptrdiff_t;
typedef long __ssize_t;
#if defined(__GNUC__) && __GNUC__ >= 3
typedef __builtin_va_list __va_list;
#else
typedef char * __va_list;
#endif
/* Wide character support types */
#ifndef __cplusplus
typedef int __wchar_t;
#endif
typedef int __wint_t;
typedef int __rune_t;
typedef void * __wctrans_t;
typedef void * __wctype_t;
#endif /* _MACHINE__TYPES_H_ */

View File

@@ -1,55 +0,0 @@
/* $OpenBSD: limits.h,v 1.5 2009/11/27 19:54:35 guenther Exp $ */
/*
* Copyright (c) 1988 The Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. 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.
* 3. Neither the name of the University 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 THE REGENTS 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 REGENTS 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.
*
* @(#)limits.h 7.2 (Berkeley) 6/28/90
*/
#ifndef _MACHINE_LIMITS_H_
#define _MACHINE_LIMITS_H_
#include <sys/cdefs.h>
#if __POSIX_VISIBLE || __XPG_VISIBLE
#ifndef SIZE_MAX
#define SIZE_MAX ULONG_MAX /* max value for a size_t */
#endif
#define SSIZE_MAX LONG_MAX /* max value for a ssize_t */
#endif
#if __BSD_VISIBLE
#define SIZE_T_MAX ULONG_MAX /* max value for a size_t (historic) */
#define UQUAD_MAX 0xffffffffffffffffULL /* max unsigned quad */
#define QUAD_MAX 0x7fffffffffffffffLL /* max signed quad */
#define QUAD_MIN (-0x7fffffffffffffffLL-1) /* min signed quad */
#endif /* __BSD_VISIBLE */
#endif /* _MACHINE_LIMITS_H_ */

View File

@@ -1,174 +0,0 @@
/* $OpenBSD: limits.h,v 1.6 2005/12/13 00:35:23 millert Exp $ */
/*
* Copyright (c) 2002 Marc Espie.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. 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 OPENBSD PROJECT 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 OPENBSD
* PROJECT 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 _SYS_LIMITS_H_
#define _SYS_LIMITS_H_
#include <sys/cdefs.h>
#include <linux/limits.h>
/* Common definitions for limits.h. */
/* Legacy */
#include <machine/limits.h>
#define CHAR_BIT 8 /* number of bits in a char */
#define SCHAR_MAX 0x7f /* max value for a signed char */
#define SCHAR_MIN (-0x7f-1) /* min value for a signed char */
#define UCHAR_MAX 0xffU /* max value for an unsigned char */
#ifdef __CHAR_UNSIGNED__
# define CHAR_MIN 0 /* min value for a char */
# define CHAR_MAX 0xff /* max value for a char */
#else
# define CHAR_MAX 0x7f
# define CHAR_MIN (-0x7f-1)
#endif
#define USHRT_MAX 0xffffU /* max value for an unsigned short */
#define SHRT_MAX 0x7fff /* max value for a short */
#define SHRT_MIN (-0x7fff-1) /* min value for a short */
#define UINT_MAX 0xffffffffU /* max value for an unsigned int */
#define INT_MAX 0x7fffffff /* max value for an int */
#define INT_MIN (-0x7fffffff-1) /* min value for an int */
#ifdef __LP64__
# define ULONG_MAX 0xffffffffffffffffUL
/* max value for unsigned long */
# define LONG_MAX 0x7fffffffffffffffL
/* max value for a signed long */
# define LONG_MIN (-0x7fffffffffffffffL-1)
/* min value for a signed long */
#else
# define ULONG_MAX 0xffffffffUL /* max value for an unsigned long */
# define LONG_MAX 0x7fffffffL /* max value for a long */
# define LONG_MIN (-0x7fffffffL-1)/* min value for a long */
#endif
#if __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999
# define ULLONG_MAX 0xffffffffffffffffULL
/* max value for unsigned long long */
# define LLONG_MAX 0x7fffffffffffffffLL
/* max value for a signed long long */
# define LLONG_MIN (-0x7fffffffffffffffLL-1)
/* min value for a signed long long */
#endif
#if __BSD_VISIBLE
# define UID_MAX UINT_MAX /* max value for a uid_t */
# define GID_MAX UINT_MAX /* max value for a gid_t */
#endif
#ifdef __LP64__
# define LONG_BIT 64
#else
# define LONG_BIT 32
#endif
/* float.h defines these as well */
# if !defined(DBL_DIG)
# if defined(__DBL_DIG)
# define DBL_DIG __DBL_DIG
# define DBL_MAX __DBL_MAX
# define DBL_MIN __DBL_MIN
# define FLT_DIG __FLT_DIG
# define FLT_MAX __FLT_MAX
# define FLT_MIN __FLT_MIN
# else
# define DBL_DIG 15
# define DBL_MAX 1.7976931348623157E+308
# define DBL_MIN 2.2250738585072014E-308
# define FLT_DIG 6
# define FLT_MAX 3.40282347E+38F
# define FLT_MIN 1.17549435E-38F
# endif
# endif
/* Bionic: the following has been optimized out from our processed kernel headers */
#define CHILD_MAX 999
#define OPEN_MAX 256
/* Bionic-specific definitions */
#define _POSIX_VERSION 200112L /* Posix C language bindings version */
#define _POSIX2_VERSION -1 /* we don't support Posix command-line tools */
#define _POSIX2_C_VERSION _POSIX_VERSION
#define _XOPEN_VERSION 500 /* by Posix definition */
#define _XOPEN_XCU_VERSION -1 /* we don't support command-line utilities */
/* tell what we implement legacy stuff when appropriate */
#if _POSIX_VERSION > 0
#define _XOPEN_XPG2 1
#define _XOPEN_XPG3 1
#define _XOPEN_XPG4 1
#define _XOPEN_UNIX 1
#endif
#define _XOPEN_ENH_I18N -1 /* we don't support internationalization in the C library */
#define _XOPEN_CRYPT -1 /* don't support X/Open Encryption */
#define _XOPEN_LEGACY -1 /* don't claim we support these, we have some of them but not all */
#define _XOPEN_REALTIME -1 /* we don't support all these functions */
#define _XOPEN_REALTIME_THREADS -1 /* same here */
#define _POSIX_REALTIME_SIGNALS -1 /* for now, this is not supported */
#define _POSIX_PRIORITY_SCHEDULING 1 /* priority scheduling is a Linux feature */
#define _POSIX_TIMERS 1 /* Posix timers are supported */
#undef _POSIX_ASYNCHRONOUS_IO /* aio_ functions are not supported */
#define _POSIX_SYNCHRONIZED_IO 1 /* synchronized i/o supported */
#define _POSIX_FSYNC 1 /* fdatasync() supported */
#define _POSIX_MAPPED_FILES 1 /* mmap-ed files supported */
/* XXX: TODO: complete and check list here */
#define _POSIX_THREADS 1 /* we support threads */
#define _POSIX_THREAD_STACKADDR 1 /* we support thread stack address */
#define _POSIX_THREAD_STACKSIZE 1 /* we support thread stack size */
#define _POSIX_THREAD_PRIO_INHERIT 200112L /* linux feature */
#define _POSIX_THREAD_PRIO_PROTECT 200112L /* linux feature */
#undef _POSIX_PROCESS_SHARED /* we don't support process-shared synchronization */
#undef _POSIX_THREAD_SAFE_FUNCTIONS /* most functions are, but not everything yet */
#define _POSIX_CHOWN_RESTRICTED 1 /* yes, chown requires appropriate privileges */
#define _POSIX_MONOTONIC_CLOCK 0 /* the monotonic clock may be available; ask sysconf */
#define _POSIX_NO_TRUNC 1 /* very long pathnames generate an error */
#define _POSIX_SAVED_IDS 1 /* saved user ids is a Linux feature */
#define _POSIX_JOB_CONTROL 1 /* job control is a Linux feature */
#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 /* the minimum mandated by POSIX */
#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
#define _POSIX_THREAD_KEYS_MAX 128 /* the minimum mandated by POSIX */
#define PTHREAD_KEYS_MAX _POSIX_THREAD_KEYS_MAX
#define _POSIX_THREAD_THREADS_MAX 64 /* the minimum mandated by POSIX */
#define PTHREAD_THREADS_MAX /* bionic has no specific limit */
#endif

View File

@@ -1,120 +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 _SYS_TYPES_H_
#define _SYS_TYPES_H_
#define __need_size_t
#define __need_ptrdiff_t
#include <stddef.h>
#include <stdint.h>
#include <sys/cdefs.h>
#include <linux/posix_types.h>
#include <asm/types.h>
#include <linux/types.h>
#include <machine/kernel.h>
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 valuea are required for Android, so use
* __kernel_uid32_t and __kernel_gid32_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_id_t id_t;
typedef __kernel_ino_t ino_t;
typedef __kernel_key_t key_t;
typedef __kernel_mode_t mode_t;
#ifndef _OFF_T_DEFINED_
#define _OFF_T_DEFINED_
typedef __kernel_off_t off_t;
#endif
typedef __kernel_loff_t loff_t;
typedef loff_t off64_t; /* GLibc-specific */
typedef __kernel_pid_t pid_t;
/* while POSIX wants these in <sys/types.h>, we
* declare then in <pthread.h> instead */
#if 0
typedef .... pthread_attr_t;
typedef .... pthread_cond_t;
typedef .... pthread_condattr_t;
typedef .... pthread_key_t;
typedef .... pthread_mutex_t;
typedef .... pthread_once_t;
typedef .... pthread_rwlock_t;
typedef .... pthread_rwlock_attr_t;
typedef .... pthread_t;
#endif
#ifndef _SSIZE_T_DEFINED_
#define _SSIZE_T_DEFINED_
typedef long int ssize_t;
#endif
typedef __kernel_suseconds_t suseconds_t;
typedef __kernel_time_t time_t;
typedef __kernel_uid32_t uid_t;
typedef signed long 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;
/* for some applications */
#include <sys/sysmacros.h>
#ifdef __BSD_VISIBLE
typedef unsigned char u_char;
typedef unsigned short u_short;
typedef unsigned int u_int;
typedef unsigned long u_long;
typedef uint32_t u_int32_t;
typedef uint16_t u_int16_t;
typedef uint8_t u_int8_t;
typedef uint64_t u_int64_t;
#endif
#endif

View File

@@ -1 +0,0 @@
arch-mips