am b8d2233e: Merge "libc: tag missing functions in system headers." into gingerbread

Merge commit 'b8d2233e8abc30f33be7d7acc7f3ef6e6aabebac' into gingerbread-plus-aosp

* commit 'b8d2233e8abc30f33be7d7acc7f3ef6e6aabebac':
  libc: tag missing functions in system headers.
This commit is contained in:
David 'Digit' Turner 2010-10-11 06:11:56 -07:00 committed by Android Git Automerger
commit 1aeeeae166
8 changed files with 34 additions and 12 deletions

View file

@ -71,14 +71,19 @@ int getopt_long_only(int, char * const *, const char *,
#ifndef _GETOPT_DEFINED_
#define _GETOPT_DEFINED_
int getopt(int, char * const *, const char *);
int getsubopt(char **, char * const *, char **);
extern char *optarg; /* getopt(3) external variables */
extern int opterr;
extern int optind;
extern int optopt;
extern int optreset;
#if 0 /* MISSING FROM BIONIC */
int getsubopt(char **, char * const *, char **);
extern char *suboptarg; /* getsubopt(3) external variable */
#endif /* MISSING */
#endif
__END_DECLS

View file

@ -69,7 +69,7 @@ extern int sched_rr_get_interval(pid_t pid, struct timespec *tp);
#define CLONE_CHILD_SETTID 0x01000000
#define CLONE_STOPPED 0x02000000
#ifdef __GNU_SOURCE
#ifdef _GNU_SOURCE
extern int clone(int (*fn)(void *), void *child_stack, int flags, void* arg, ...);
#endif

View file

@ -120,6 +120,7 @@ extern int siginterrupt(int sig, int flag);
extern int raise(int);
extern int kill(pid_t, int);
extern int killpg(int pgrp, int sig);
extern int sigaltstack(const stack_t *ss, stack_t *oss);
__END_DECLS

View file

@ -300,8 +300,10 @@ __END_DECLS
#define L_cuserid 9 /* size for cuserid(); UT_NAMESIZE + 1 */
__BEGIN_DECLS
#if 0 /* MISSING FROM BIONIC */
char *ctermid(char *);
char *cuserid(char *);
#endif /* MISSING */
FILE *fdopen(int, const char *);
int fileno(FILE *);

View file

@ -50,7 +50,6 @@ __BEGIN_DECLS
extern __noreturn void exit(int);
extern __noreturn void abort(void);
extern int atexit(void (*)(void));
extern int on_exit(void (*)(int, void *), void *);
extern char *getenv(const char *);
extern int putenv(const char *);
@ -164,6 +163,7 @@ typedef struct {
extern lldiv_t lldiv(long long, long long);
#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);
@ -172,8 +172,14 @@ 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
#if 0 /* MISSING FROM BIONIC */
extern int on_exit(void (*)(int, void *), void *);
#endif /* MISSING */
__END_DECLS
#endif /* _STDLIB_H_ */

View file

@ -33,8 +33,10 @@
__BEGIN_DECLS
#if 0 /* MISSING FROM BIONIC */
extern int setfsuid(uid_t);
extern int setfsgid(gid_t);
#endif /* MISSING */
__END_DECLS

View file

@ -92,7 +92,10 @@ extern int mount(const char *, const char *,
const void *);
extern int umount(const char *);
extern int umount2(const char *, int);
#if 0 /* MISSING FROM BIONIC */
extern int pivot_root(const char *, const char *);
#endif /* MISSING */
__END_DECLS

View file

@ -61,16 +61,13 @@ extern pid_t getppid(void);
extern pid_t getpgrp(void);
extern int setpgrp(void);
extern pid_t setsid(void);
extern pid_t getsid(pid_t);
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 execvpe(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 execlpe(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);
extern int prctl(int option, unsigned long arg2, unsigned long arg3,
@ -94,11 +91,8 @@ 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 getfsuid(uid_t);
extern int setfsuid(uid_t);
extern int issetugid(void);
extern char* getlogin(void);
extern int getlogin_r(char* name, size_t namesize);
extern char* getusershell(void);
extern void setusershell(void);
extern void endusershell(void);
@ -156,9 +150,6 @@ extern unsigned int sleep(unsigned int);
extern int usleep(unsigned long);
extern int gethostname(char *, size_t);
extern int sethostname(const char *, size_t);
extern int getdomainname(char *, size_t);
extern int setdomainname(const char *, size_t);
extern int getdtablesize(void);
@ -195,6 +186,18 @@ 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; \