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 | |
Tanguy Pruvot | 301d311 | 2012-07-14 01:49:18 +0200 | [diff] [blame] | 32 | /* SYSCALLS */ |
Tanguy Pruvot | 6fef6a3 | 2012-05-05 15:26:43 +0200 | [diff] [blame] | 33 | int stime(time_t *); |
| 34 | int swapon(const char *, int); |
| 35 | int swapoff(const char *); |
| 36 | int getsid(pid_t); |
Tanguy Pruvot | 8aeb371 | 2011-06-30 08:59:26 +0200 | [diff] [blame] | 37 | |
Tanguy Pruvot | 301d311 | 2012-07-14 01:49:18 +0200 | [diff] [blame] | 38 | #ifndef SYS_ioprio_set |
| 39 | #define SYS_ioprio_set __NR_ioprio_set |
| 40 | #define SYS_ioprio_get __NR_ioprio_get |
| 41 | #endif |
| 42 | |
Tanguy Pruvot | 8aeb371 | 2011-06-30 08:59:26 +0200 | [diff] [blame] | 43 | /* local definition in libbb/xfuncs_printf.c */ |
| 44 | int fdprintf(int fd, const char *format, ...); |
| 45 | |
| 46 | /* local definitions in libbb/android.c */ |
| 47 | int ttyname_r(int, char *, size_t); |
| 48 | |
| 49 | char *getusershell(void); |
| 50 | void setusershell(void); |
| 51 | void endusershell(void); |
| 52 | |
| 53 | struct mntent; |
| 54 | struct __sFILE; |
| 55 | int addmntent(struct __sFILE *, const struct mntent *); |
| 56 | struct mntent *getmntent_r(struct __sFILE *fp, struct mntent *mnt, char *buf, int buflen); |
| 57 | const char *hasmntopt(const struct mntent *, const char *); |
| 58 | |
| 59 | #define MNTOPT_NOAUTO "noauto" |
| 60 | |
| 61 | /* bionic's vfork is rather broken; for now a terrible bandaid: */ |
| 62 | #define vfork fork |
| 63 | |
Tanguy Pruvot | 8a6c2c2 | 2012-04-28 00:24:09 +0200 | [diff] [blame] | 64 | #define _SOCKLEN_T_DECLARED |
| 65 | typedef int socklen_t; |
| 66 | |
Tanguy Pruvot | 8aeb371 | 2011-06-30 08:59:26 +0200 | [diff] [blame] | 67 | #endif |