blob: d0654227cb635db35d29b89670a4ae36c527b442 [file] [log] [blame]
Tanguy Pruvot8aeb3712011-06-30 08:59:26 +02001/* 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 */
24void endutent(void);
25
26/* defined in bionic/mktemp.c */
27char *mkdtemp(char *);
28
29/* defined in bionic/stubs.c */
30char *ttyname(int);
31
32/* added to SYSCALLS.TXT:
33int stime(time_t *) 25
34int swapon(const char *, int) 87
35int swapoff(const char *) 115
36*/
37int stime (time_t *);
38int swapon (const char *, int);
39int swapoff (const char *);
40
41/* local definition in libbb/xfuncs_printf.c */
42int fdprintf(int fd, const char *format, ...);
43
44/* local definitions in libbb/android.c */
45int ttyname_r(int, char *, size_t);
46
47char *getusershell(void);
48void setusershell(void);
49void endusershell(void);
50
51struct mntent;
52struct __sFILE;
53int addmntent(struct __sFILE *, const struct mntent *);
54struct mntent *getmntent_r(struct __sFILE *fp, struct mntent *mnt, char *buf, int buflen);
55const 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