1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
/* ISC license. */
#ifndef SKALIBS_POSIXPLZ_H
#define SKALIBS_POSIXPLZ_H
#include <sys/types.h>
#include <sys/stat.h>
#include <skalibs/gccattributes.h>
#include <skalibs/functypes.h>
/*
Stuff that doesn't have its own POSIX header for some reason.
*/
extern char **environ ;
/*
Stuff that _is_ POSIX, but some OSes still don't have it.
openat() et al. should be here, but they're impossible to
emulate correctly, and I don't want an app using openat()
to think it has safe POSIX semantics when it doesn't :/
EPROTO et al. should be here, but ugh ifdef forests.
*/
extern size_t strnlen (char const *, size_t) gccattr_pure ;
/*
Non-POSIX functions that some OSes provide and others don't.
setgroups() isn't included because it's its own kind of broken.
*/
extern void *memmem (void const *, size_t, void const *, size_t) gccattr_pure ;
extern int getpeereid (int, uid_t *, gid_t *) ;
/*
Functions that aren't standard at all, but honestly could be. :P
*/
extern void execvep (char const *, char const *const *, char const *const *, char const *) ;
extern void execvep_loose (char const *, char const *const *, char const *const *, char const *) ;
extern void unlink_void (char const *) ;
extern pid_t doublefork (void) ;
extern int touch (char const *) ;
extern int mkfiletemp (char *, createfunc_t_ref, mode_t, void *) ;
extern int mklinktemp (char const *, char *, linkfunc_t_ref) ;
extern int mkptemp (char *) ;
extern int mkltemp (char const *, char *) ;
extern int mkLtemp (char const *, char *) ;
extern int mkctemp (char *, mode_t, dev_t) ;
extern int mkbtemp (char *, mode_t, dev_t) ;
#endif
|