Tanguy Pruvot | 8aeb371 | 2011-06-30 08:59:26 +0200 | [diff] [blame] | 1 | /* vi: set sw=4 ts=4: */ |
| 2 | /* |
| 3 | Copyright 2010, Dylan Simon |
| 4 | |
| 5 | Licensed under the GPL v2 or later, see the file LICENSE in this tarball. |
| 6 | */ |
| 7 | |
| 8 | #ifndef BB_ANDROID_H |
| 9 | #define BB_ANDROID_H 1 |
| 10 | |
| 11 | /* for dirname, basename */ |
| 12 | #include <libgen.h> |
| 13 | |
| 14 | #if ENABLE_FEATURE_DC_LIBM |
| 15 | # include <math.h> |
| 16 | #endif |
| 17 | |
| 18 | #define killpg_busybox(P, S) kill(-(P), S) |
| 19 | |
| 20 | #define setmntent fopen |
| 21 | #define endmntent fclose |
| 22 | |
| 23 | /* defined in bionic/utmp.c */ |
| 24 | void endutent(void); |
| 25 | |
| 26 | /* defined in bionic/mktemp.c */ |
| 27 | char *mkdtemp(char *); |
| 28 | |
| 29 | /* defined in bionic/stubs.c */ |
| 30 | char *ttyname(int); |
| 31 | |
| 32 | /* added to SYSCALLS.TXT: |
| 33 | int stime(time_t *) 25 |
| 34 | int swapon(const char *, int) 87 |
| 35 | int swapoff(const char *) 115 |
| 36 | */ |
| 37 | int stime (time_t *); |
| 38 | int swapon (const char *, int); |
| 39 | int swapoff (const char *); |
| 40 | |
| 41 | /* local definition in libbb/xfuncs_printf.c */ |
| 42 | int fdprintf(int fd, const char *format, ...); |
| 43 | |
| 44 | /* local definitions in libbb/android.c */ |
| 45 | int ttyname_r(int, char *, size_t); |
| 46 | |
| 47 | char *getusershell(void); |
| 48 | void setusershell(void); |
| 49 | void endusershell(void); |
| 50 | |
| 51 | struct mntent; |
| 52 | struct __sFILE; |
| 53 | int addmntent(struct __sFILE *, const struct mntent *); |
| 54 | struct mntent *getmntent_r(struct __sFILE *fp, struct mntent *mnt, char *buf, int buflen); |
| 55 | const char *hasmntopt(const struct mntent *, const char *); |
| 56 | |
| 57 | #define MNTOPT_NOAUTO "noauto" |
| 58 | |
| 59 | /* bionic's vfork is rather broken; for now a terrible bandaid: */ |
| 60 | #define vfork fork |
| 61 | |
| 62 | #endif |