Remove non-existanec functions/variables from libc.so
See b.android.com/69319 android-9+ __evOptMonoTime _nres __p_default_section_syms __p_update_section_syms _rand48_add _rand48_mult _rand48_seed _res_opcodes __sFext android-12+ copy_tm_to_TM copy_TM_to_tm __dtoa _endhtent __fremovelock _gethtbyaddr _gethtbyname _gethtbyname2 _gethtent __libc_android_abort _mktemp # mktemp already exist in header __pread64 # add pread64, pwrite64 and ftruncate64 to API >= 12 __pwrite64 res_need_init __res_ourserver_p _sethtent __set_syscall_errno __sfvwrite __timer_table_start_stop valid_tm_mon valid_tm_wday android-14+ __libc_android_log_assert __libc_android_log_print __libc_android_log_vprint android-17+ dlmalloc_walk_free_pages dlmalloc_walk_heap __get_pc android-18+ __get_res_cache __libc_init_common __libc_preinit Change-Id: Ie67acf115427e808dde0e33411671b07a888a9b6
This commit is contained in:
@@ -110,7 +110,6 @@ __dn_comp
|
||||
__dn_count_labels
|
||||
__dn_skipname
|
||||
__dorand48
|
||||
__dtoa
|
||||
__eqdf2
|
||||
__errno
|
||||
__evAddTime
|
||||
@@ -139,7 +138,6 @@ __floatunsisf
|
||||
__fork
|
||||
__fp_nquery
|
||||
__fp_query
|
||||
__fremovelock
|
||||
__fstatfs64
|
||||
__futex_syscall3
|
||||
__futex_syscall4
|
||||
@@ -181,7 +179,6 @@ __hostalias
|
||||
__init_tls
|
||||
__ioctl
|
||||
__ledf2
|
||||
__libc_android_abort
|
||||
__libc_android_log_assert
|
||||
__libc_android_log_print
|
||||
__libc_android_log_vprint
|
||||
@@ -236,7 +233,6 @@ __p_section
|
||||
__p_sockun
|
||||
__p_time
|
||||
__p_type
|
||||
__pread64
|
||||
__pthread_cleanup_pop
|
||||
__pthread_cleanup_push
|
||||
__pthread_clone
|
||||
@@ -245,7 +241,6 @@ __pthread_cond_timedwait_relative
|
||||
__ptrace
|
||||
__putlong
|
||||
__putshort
|
||||
__pwrite64
|
||||
__reboot
|
||||
__res_close
|
||||
__res_dnok
|
||||
@@ -271,7 +266,6 @@ __res_nquerydomain
|
||||
__res_nsearch
|
||||
__res_nsend
|
||||
__res_opt
|
||||
__res_ourserver_p
|
||||
__res_ownok
|
||||
__res_pquery
|
||||
__res_put_state
|
||||
@@ -288,7 +282,6 @@ __rt_sigaction
|
||||
__rt_sigprocmask
|
||||
__rt_sigtimedwait
|
||||
__sclose
|
||||
__set_syscall_errno
|
||||
__set_tls
|
||||
__setresuid
|
||||
__setreuid
|
||||
@@ -296,7 +289,6 @@ __setuid
|
||||
__sflags
|
||||
__sflush
|
||||
__sfp
|
||||
__sfvwrite
|
||||
__sigsuspend
|
||||
__sinit
|
||||
__slbexpand
|
||||
@@ -330,7 +322,6 @@ __timer_delete
|
||||
__timer_getoverrun
|
||||
__timer_gettime
|
||||
__timer_settime
|
||||
__timer_table_start_stop
|
||||
__truncdfsf2
|
||||
__udivdi3
|
||||
__udivsi3
|
||||
@@ -340,21 +331,14 @@ __wait4
|
||||
__waitid
|
||||
_cleanup
|
||||
_dorand48
|
||||
_endhtent
|
||||
_exit
|
||||
_exit_thread
|
||||
_exit_with_stack_teardown
|
||||
_fwalk
|
||||
_gethtbyaddr
|
||||
_gethtbyname
|
||||
_gethtbyname2
|
||||
_gethtent
|
||||
_getlong
|
||||
_getshort
|
||||
_init_thread
|
||||
_longjmp
|
||||
_mktemp
|
||||
_sethtent
|
||||
_setjmp
|
||||
_thread_created_hook
|
||||
abort
|
||||
@@ -408,8 +392,6 @@ closedir
|
||||
closelog
|
||||
closelog_r
|
||||
connect
|
||||
copy_TM_to_tm
|
||||
copy_tm_to_TM
|
||||
cpuacct_add
|
||||
creat
|
||||
ctime
|
||||
@@ -517,6 +499,7 @@ ftello
|
||||
ftime
|
||||
ftok
|
||||
ftruncate
|
||||
ftruncate64
|
||||
ftrylockfile
|
||||
fts_children
|
||||
fts_close
|
||||
@@ -720,6 +703,7 @@ poll
|
||||
popen
|
||||
prctl
|
||||
pread
|
||||
pread64
|
||||
printf
|
||||
pselect
|
||||
pthread_attr_destroy
|
||||
@@ -811,6 +795,7 @@ putw
|
||||
putwc
|
||||
putwchar
|
||||
pwrite
|
||||
pwrite64
|
||||
qsort
|
||||
raise
|
||||
read
|
||||
@@ -833,7 +818,6 @@ rename
|
||||
renameat
|
||||
res_init
|
||||
res_mkquery
|
||||
res_need_init
|
||||
res_query
|
||||
res_search
|
||||
restore_core_regs
|
||||
@@ -1009,8 +993,6 @@ utime
|
||||
utimensat
|
||||
utimes
|
||||
utmpname
|
||||
valid_tm_mon
|
||||
valid_tm_wday
|
||||
valloc
|
||||
vasprintf
|
||||
verr
|
||||
|
||||
@@ -4,17 +4,14 @@ _C_toupper_
|
||||
__atexit
|
||||
__atexit_invalid
|
||||
__bionic_brk
|
||||
__evOptMonoTime
|
||||
__isthreaded
|
||||
__libc_malloc_default_dispatch
|
||||
__libc_malloc_dispatch
|
||||
__p_cert_syms
|
||||
__p_class_syms
|
||||
__p_default_section_syms
|
||||
__p_key_syms
|
||||
__p_rcode_syms
|
||||
__p_type_syms
|
||||
__p_update_section_syms
|
||||
__page_shift
|
||||
__page_size
|
||||
__progname
|
||||
@@ -22,18 +19,12 @@ __rand48_add
|
||||
__rand48_mult
|
||||
__rand48_seed
|
||||
__sF
|
||||
__sFext
|
||||
__sdidinit
|
||||
__sglue
|
||||
__stack_chk_guard
|
||||
__system_property_area__
|
||||
_ctype_
|
||||
_nres
|
||||
_ns_flagdata
|
||||
_rand48_add
|
||||
_rand48_mult
|
||||
_rand48_seed
|
||||
_res_opcodes
|
||||
_tolower_tab_
|
||||
_toupper_tab_
|
||||
daylight
|
||||
|
||||
@@ -23,7 +23,6 @@ __dn_comp
|
||||
__dn_count_labels
|
||||
__dn_skipname
|
||||
__dorand48
|
||||
__dtoa
|
||||
__errno
|
||||
__evAddTime
|
||||
__evCmpTime
|
||||
@@ -40,7 +39,6 @@ __findenv
|
||||
__fork
|
||||
__fp_nquery
|
||||
__fp_query
|
||||
__fremovelock
|
||||
__fstatfs64
|
||||
__futex_syscall3
|
||||
__futex_syscall4
|
||||
@@ -108,7 +106,6 @@ __p_section
|
||||
__p_sockun
|
||||
__p_time
|
||||
__p_type
|
||||
__pread64
|
||||
__pthread_cleanup_pop
|
||||
__pthread_cleanup_push
|
||||
__pthread_clone
|
||||
@@ -117,7 +114,6 @@ __pthread_cond_timedwait_relative
|
||||
__ptrace
|
||||
__putlong
|
||||
__putshort
|
||||
__pwrite64
|
||||
__reboot
|
||||
__res_close
|
||||
__res_dnok
|
||||
@@ -143,7 +139,6 @@ __res_nquerydomain
|
||||
__res_nsearch
|
||||
__res_nsend
|
||||
__res_opt
|
||||
__res_ourserver_p
|
||||
__res_ownok
|
||||
__res_pquery
|
||||
__res_put_state
|
||||
@@ -159,7 +154,6 @@ __rt_sigaction
|
||||
__rt_sigprocmask
|
||||
__rt_sigtimedwait
|
||||
__sclose
|
||||
__set_syscall_errno
|
||||
__set_thread_area
|
||||
__set_tls
|
||||
__setresuid
|
||||
@@ -168,7 +162,6 @@ __setuid
|
||||
__sflags
|
||||
__sflush
|
||||
__sfp
|
||||
__sfvwrite
|
||||
__sigsuspend
|
||||
__sinit
|
||||
__slbexpand
|
||||
@@ -200,27 +193,19 @@ __timer_delete
|
||||
__timer_getoverrun
|
||||
__timer_gettime
|
||||
__timer_settime
|
||||
__timer_table_start_stop
|
||||
__wait4
|
||||
__waitid
|
||||
_cleanup
|
||||
_dorand48
|
||||
_endhtent
|
||||
_exit
|
||||
_exit_thread
|
||||
_exit_with_stack_teardown
|
||||
_flush_cache
|
||||
_fwalk
|
||||
_gethtbyaddr
|
||||
_gethtbyname
|
||||
_gethtbyname2
|
||||
_gethtent
|
||||
_getlong
|
||||
_getshort
|
||||
_init_thread
|
||||
_longjmp
|
||||
_mktemp
|
||||
_sethtent
|
||||
_setjmp
|
||||
_thread_created_hook
|
||||
_waitpid
|
||||
@@ -275,8 +260,6 @@ closedir
|
||||
closelog
|
||||
closelog_r
|
||||
connect
|
||||
copy_TM_to_tm
|
||||
copy_tm_to_TM
|
||||
cpuacct_add
|
||||
creat
|
||||
ctime
|
||||
@@ -384,6 +367,7 @@ ftello
|
||||
ftime
|
||||
ftok
|
||||
ftruncate
|
||||
ftruncate64
|
||||
ftrylockfile
|
||||
fts_children
|
||||
fts_close
|
||||
@@ -587,6 +571,7 @@ poll
|
||||
popen
|
||||
prctl
|
||||
pread
|
||||
pread64
|
||||
printf
|
||||
pselect
|
||||
pthread_attr_destroy
|
||||
@@ -678,6 +663,7 @@ putw
|
||||
putwc
|
||||
putwchar
|
||||
pwrite
|
||||
pwrite64
|
||||
qsort
|
||||
raise
|
||||
read
|
||||
@@ -700,7 +686,6 @@ rename
|
||||
renameat
|
||||
res_init
|
||||
res_mkquery
|
||||
res_need_init
|
||||
res_query
|
||||
res_search
|
||||
rewind
|
||||
@@ -875,8 +860,6 @@ utime
|
||||
utimes
|
||||
utimensat
|
||||
utmpname
|
||||
valid_tm_mon
|
||||
valid_tm_wday
|
||||
valloc
|
||||
vasprintf
|
||||
verr
|
||||
|
||||
@@ -4,17 +4,14 @@ _C_toupper_
|
||||
__atexit
|
||||
__atexit_invalid
|
||||
__bionic_brk
|
||||
__evOptMonoTime
|
||||
__isthreaded
|
||||
__libc_malloc_default_dispatch
|
||||
__libc_malloc_dispatch
|
||||
__p_cert_syms
|
||||
__p_class_syms
|
||||
__p_default_section_syms
|
||||
__p_key_syms
|
||||
__p_rcode_syms
|
||||
__p_type_syms
|
||||
__p_update_section_syms
|
||||
__page_shift
|
||||
__page_size
|
||||
__progname
|
||||
@@ -22,18 +19,12 @@ __rand48_add
|
||||
__rand48_mult
|
||||
__rand48_seed
|
||||
__sF
|
||||
__sFext
|
||||
__sdidinit
|
||||
__sglue
|
||||
__stack_chk_guard
|
||||
__system_property_area__
|
||||
_ctype_
|
||||
_nres
|
||||
_ns_flagdata
|
||||
_rand48_add
|
||||
_rand48_mult
|
||||
_rand48_seed
|
||||
_res_opcodes
|
||||
_tolower_tab_
|
||||
_toupper_tab_
|
||||
daylight
|
||||
|
||||
@@ -19,7 +19,6 @@ __dn_comp
|
||||
__dn_count_labels
|
||||
__dn_skipname
|
||||
__dorand48
|
||||
__dtoa
|
||||
__errno
|
||||
__evAddTime
|
||||
__evCmpTime
|
||||
@@ -36,7 +35,6 @@ __findenv
|
||||
__fork
|
||||
__fp_nquery
|
||||
__fp_query
|
||||
__fremovelock
|
||||
__fstatfs64
|
||||
__futex_syscall3
|
||||
__futex_syscall4
|
||||
@@ -104,7 +102,6 @@ __p_section
|
||||
__p_sockun
|
||||
__p_time
|
||||
__p_type
|
||||
__pread64
|
||||
__pthread_cleanup_pop
|
||||
__pthread_cleanup_push
|
||||
__pthread_clone
|
||||
@@ -113,7 +110,6 @@ __pthread_cond_timedwait_relative
|
||||
__ptrace
|
||||
__putlong
|
||||
__putshort
|
||||
__pwrite64
|
||||
__reboot
|
||||
__res_close
|
||||
__res_dnok
|
||||
@@ -139,7 +135,6 @@ __res_nquerydomain
|
||||
__res_nsearch
|
||||
__res_nsend
|
||||
__res_opt
|
||||
__res_ourserver_p
|
||||
__res_ownok
|
||||
__res_pquery
|
||||
__res_put_state
|
||||
@@ -155,7 +150,6 @@ __rt_sigaction
|
||||
__rt_sigprocmask
|
||||
__rt_sigtimedwait
|
||||
__sclose
|
||||
__set_syscall_errno
|
||||
__set_thread_area
|
||||
__set_tls
|
||||
__setresuid
|
||||
@@ -164,7 +158,6 @@ __setuid
|
||||
__sflags
|
||||
__sflush
|
||||
__sfp
|
||||
__sfvwrite
|
||||
__sigsuspend
|
||||
__sinit
|
||||
__slbexpand
|
||||
@@ -196,28 +189,20 @@ __timer_delete
|
||||
__timer_getoverrun
|
||||
__timer_gettime
|
||||
__timer_settime
|
||||
__timer_table_start_stop
|
||||
__udivdi3
|
||||
__umoddi3
|
||||
__wait4
|
||||
__waitid
|
||||
_cleanup
|
||||
_dorand48
|
||||
_endhtent
|
||||
_exit
|
||||
_exit_thread
|
||||
_exit_with_stack_teardown
|
||||
_fwalk
|
||||
_gethtbyaddr
|
||||
_gethtbyname
|
||||
_gethtbyname2
|
||||
_gethtent
|
||||
_getlong
|
||||
_getshort
|
||||
_init_thread
|
||||
_longjmp
|
||||
_mktemp
|
||||
_sethtent
|
||||
_setjmp
|
||||
_thread_created_hook
|
||||
_waitpid
|
||||
@@ -270,8 +255,6 @@ closedir
|
||||
closelog
|
||||
closelog_r
|
||||
connect
|
||||
copy_TM_to_tm
|
||||
copy_tm_to_TM
|
||||
cpuacct_add
|
||||
creat
|
||||
ctime
|
||||
@@ -378,6 +361,7 @@ ftello
|
||||
ftime
|
||||
ftok
|
||||
ftruncate
|
||||
ftruncate64
|
||||
ftrylockfile
|
||||
fts_children
|
||||
fts_close
|
||||
@@ -581,6 +565,7 @@ poll
|
||||
popen
|
||||
prctl
|
||||
pread
|
||||
pread64
|
||||
printf
|
||||
pselect
|
||||
pthread_attr_destroy
|
||||
@@ -672,6 +657,7 @@ putw
|
||||
putwc
|
||||
putwchar
|
||||
pwrite
|
||||
pwrite64
|
||||
qsort
|
||||
raise
|
||||
read
|
||||
@@ -694,7 +680,6 @@ rename
|
||||
renameat
|
||||
res_init
|
||||
res_mkquery
|
||||
res_need_init
|
||||
res_query
|
||||
res_search
|
||||
rewind
|
||||
@@ -869,8 +854,6 @@ utime
|
||||
utimensat
|
||||
utimes
|
||||
utmpname
|
||||
valid_tm_mon
|
||||
valid_tm_wday
|
||||
valloc
|
||||
vasprintf
|
||||
verr
|
||||
|
||||
@@ -4,17 +4,14 @@ _C_toupper_
|
||||
__atexit
|
||||
__atexit_invalid
|
||||
__bionic_brk
|
||||
__evOptMonoTime
|
||||
__isthreaded
|
||||
__libc_malloc_default_dispatch
|
||||
__libc_malloc_dispatch
|
||||
__p_cert_syms
|
||||
__p_class_syms
|
||||
__p_default_section_syms
|
||||
__p_key_syms
|
||||
__p_rcode_syms
|
||||
__p_type_syms
|
||||
__p_update_section_syms
|
||||
__page_shift
|
||||
__page_size
|
||||
__progname
|
||||
@@ -22,18 +19,12 @@ __rand48_add
|
||||
__rand48_mult
|
||||
__rand48_seed
|
||||
__sF
|
||||
__sFext
|
||||
__sdidinit
|
||||
__sglue
|
||||
__stack_chk_guard
|
||||
__system_property_area__
|
||||
_ctype_
|
||||
_nres
|
||||
_ns_flagdata
|
||||
_rand48_add
|
||||
_rand48_mult
|
||||
_rand48_seed
|
||||
_res_opcodes
|
||||
_tolower_tab_
|
||||
_toupper_tab_
|
||||
daylight
|
||||
|
||||
215
ndk/platforms/android-12/include/unistd.h
Normal file
215
ndk/platforms/android-12/include/unistd.h
Normal file
@@ -0,0 +1,215 @@
|
||||
/*
|
||||
* 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 _UNISTD_H_
|
||||
#define _UNISTD_H_
|
||||
|
||||
#include <stddef.h>
|
||||
#include <sys/cdefs.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/select.h>
|
||||
#include <sys/sysconf.h>
|
||||
#include <linux/capability.h>
|
||||
#include <pathconf.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/* Standard file descriptor numbers. */
|
||||
#define STDIN_FILENO 0
|
||||
#define STDOUT_FILENO 1
|
||||
#define STDERR_FILENO 2
|
||||
|
||||
/* Values for whence in fseek and lseek */
|
||||
#define SEEK_SET 0
|
||||
#define SEEK_CUR 1
|
||||
#define SEEK_END 2
|
||||
|
||||
extern char **environ;
|
||||
extern __noreturn void _exit(int);
|
||||
|
||||
extern pid_t fork(void);
|
||||
extern pid_t vfork(void);
|
||||
extern pid_t getpid(void);
|
||||
extern pid_t gettid(void);
|
||||
extern pid_t getpgid(pid_t);
|
||||
extern int setpgid(pid_t, pid_t);
|
||||
extern pid_t getppid(void);
|
||||
extern pid_t getpgrp(void);
|
||||
extern int setpgrp(void);
|
||||
extern pid_t setsid(void);
|
||||
|
||||
extern int execv(const char *, char * const *);
|
||||
extern int execvp(const char *, char * const *);
|
||||
extern int execve(const char *, char * const *, char * const *);
|
||||
extern int execl(const char *, const char *, ...);
|
||||
extern int execlp(const char *, const char *, ...);
|
||||
extern int execle(const char *, const char *, ...);
|
||||
extern int capget(cap_user_header_t hdrp, cap_user_data_t datap);
|
||||
extern int capset(cap_user_header_t hdrp, const cap_user_data_t datap);
|
||||
|
||||
/* IMPORTANT: See comment under <sys/prctl.h> about this declaration */
|
||||
extern int prctl(int option, ...);
|
||||
|
||||
extern int nice(int);
|
||||
|
||||
extern int setuid(uid_t);
|
||||
extern uid_t getuid(void);
|
||||
extern int seteuid(uid_t);
|
||||
extern uid_t geteuid(void);
|
||||
extern int setgid(gid_t);
|
||||
extern gid_t getgid(void);
|
||||
extern int setegid(gid_t);
|
||||
extern gid_t getegid(void);
|
||||
extern int getgroups(int, gid_t *);
|
||||
extern int setgroups(size_t, const gid_t *);
|
||||
extern int setreuid(uid_t, uid_t);
|
||||
extern int setregid(gid_t, gid_t);
|
||||
extern int setresuid(uid_t, uid_t, uid_t);
|
||||
extern int setresgid(gid_t, gid_t, gid_t);
|
||||
extern int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid);
|
||||
extern int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid);
|
||||
extern int issetugid(void);
|
||||
extern char* getlogin(void);
|
||||
extern char* getusershell(void);
|
||||
extern void setusershell(void);
|
||||
extern void endusershell(void);
|
||||
|
||||
|
||||
|
||||
/* Macros for access() */
|
||||
#define R_OK 4 /* Read */
|
||||
#define W_OK 2 /* Write */
|
||||
#define X_OK 1 /* Execute */
|
||||
#define F_OK 0 /* Existence */
|
||||
|
||||
extern int access(const char *, int);
|
||||
extern int link(const char *, const char *);
|
||||
extern int unlink(const char *);
|
||||
extern int chdir(const char *);
|
||||
extern int fchdir(int);
|
||||
extern int rmdir(const char *);
|
||||
extern int pipe(int *);
|
||||
#ifdef _GNU_SOURCE /* GLibc compatibility */
|
||||
extern int pipe2(int *, int);
|
||||
#endif
|
||||
extern int chroot(const char *);
|
||||
extern int symlink(const char *, const char *);
|
||||
extern int readlink(const char *, char *, size_t);
|
||||
extern int chown(const char *, uid_t, gid_t);
|
||||
extern int fchown(int, uid_t, gid_t);
|
||||
extern int lchown(const char *, uid_t, gid_t);
|
||||
extern int truncate(const char *, off_t);
|
||||
extern char *getcwd(char *, size_t);
|
||||
|
||||
extern int sync(void);
|
||||
|
||||
extern int close(int);
|
||||
extern off_t lseek(int, off_t, int);
|
||||
extern off64_t lseek64(int, off64_t, int);
|
||||
|
||||
extern ssize_t read(int, void *, size_t);
|
||||
extern ssize_t write(int, const void *, size_t);
|
||||
extern ssize_t pread(int, void *, size_t, off_t);
|
||||
extern ssize_t pread64(int, void *, size_t, off64_t);
|
||||
extern ssize_t pwrite(int, const void *, size_t, off_t);
|
||||
extern ssize_t pwrite64(int, const void *, size_t, off64_t);
|
||||
|
||||
extern int dup(int);
|
||||
extern int dup2(int, int);
|
||||
extern int fcntl(int, int, ...);
|
||||
extern int ioctl(int, int, ...);
|
||||
extern int flock(int, int);
|
||||
extern int fsync(int);
|
||||
extern int fdatasync(int);
|
||||
extern int ftruncate(int, off_t);
|
||||
extern int ftruncate64(int, off64_t);
|
||||
|
||||
extern int pause(void);
|
||||
extern unsigned int alarm(unsigned int);
|
||||
extern unsigned int sleep(unsigned int);
|
||||
extern int usleep(unsigned long);
|
||||
|
||||
extern int gethostname(char *, size_t);
|
||||
|
||||
extern int getdtablesize(void);
|
||||
|
||||
extern void *__brk(void *);
|
||||
extern int brk(void *);
|
||||
extern void *sbrk(ptrdiff_t);
|
||||
|
||||
extern int getopt(int, char * const *, const char *);
|
||||
extern char *optarg;
|
||||
extern int optind, opterr, optopt;
|
||||
|
||||
extern int isatty(int);
|
||||
extern char* ttyname(int);
|
||||
extern int ttyname_r(int, char*, size_t);
|
||||
|
||||
extern int acct(const char* filepath);
|
||||
|
||||
static __inline__ int getpagesize(void) {
|
||||
extern unsigned int __page_size;
|
||||
return __page_size;
|
||||
}
|
||||
static __inline__ int __getpageshift(void) {
|
||||
extern unsigned int __page_shift;
|
||||
return __page_shift;
|
||||
}
|
||||
|
||||
extern int sysconf(int name);
|
||||
|
||||
extern int daemon(int, int);
|
||||
|
||||
/* A special syscall that is only available on the ARM, not x86 function. */
|
||||
extern int cacheflush(long start, long end, long flags);
|
||||
|
||||
extern pid_t tcgetpgrp(int fd);
|
||||
extern int tcsetpgrp(int fd, pid_t _pid);
|
||||
|
||||
#if 0 /* MISSING FROM BIONIC */
|
||||
extern pid_t getsid(pid_t);
|
||||
extern int execvpe(const char *, char * const *, char * const *);
|
||||
extern int execlpe(const char *, const char *, ...);
|
||||
extern int getfsuid(uid_t);
|
||||
extern int setfsuid(uid_t);
|
||||
extern int getlogin_r(char* name, size_t namesize);
|
||||
extern int sethostname(const char *, size_t);
|
||||
extern int getdomainname(char *, size_t);
|
||||
extern int setdomainname(const char *, size_t);
|
||||
#endif /* MISSING */
|
||||
|
||||
/* Used to retry syscalls that can return EINTR. */
|
||||
#define TEMP_FAILURE_RETRY(exp) ({ \
|
||||
typeof (exp) _rc; \
|
||||
do { \
|
||||
_rc = (exp); \
|
||||
} while (_rc == -1 && errno == EINTR); \
|
||||
_rc; })
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* _UNISTD_H_ */
|
||||
Reference in New Issue
Block a user