-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmachine.h
64 lines (55 loc) · 1.49 KB
/
machine.h
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
59
60
61
62
63
64
/* $Id: machine.h,v 2.5 2008/07/09 19:40:09 ksb Exp $
*
* we don't love autoconfig as much as we should (ksb)
*/
/* efficient accept logic in kernel
*/
#if !defined(HAVE_ACCEPT_FILTER)
#define HAVE_ACCEPT_FILTER (defined(FREEBSD))
#endif
/* find name of peer process with /proc/$PID/file symblic link
*/
#if !defined(HAVE_PROCFS)
#define HAVE_PROCFS (defined(FREEBSD) || defined(LINUX))
#endif
/* have SCM_RIGHTS
*/
#if !defined(HAVE_SCM_RIGHTS)
#if SUN5
#define HAVE_SCM_RIGHTS 0
#else
#define HAVE_SCM_RIGHTS (defined(SCM_RIGHTS) || defined(LINUX))
#endif
#endif
/* sys/pipe.h, strangely only found on some *BSD systems
*/
#if !defined(HAVE_SYS_PIPE_H)
#define HAVE_SYS_PIPE_H (defined(FREEBSD))
#endif
/* We just this, but I hate the kludge
*/
#if !defined(EMU_SOCKUN_LEN)
#define EMU_SOCKUN_LEN(Mpc) (strlen(Mpc)+2)
#endif
/* If we have arc4random we are special, really most people don't
*/
#if !defined(EMU_ARC4RANDOM)
#define EMU_ARC4RANDOM !(defined(FREEBSD)||defined(OPENBSD))
#endif
/* I like snprintf as much as the next guy, but this is hard to
* justify. I need a better emulation for it.
*/
#if !defined(HAVE_SNPRINTF)
#define HAVE_SNPRINTF !(defined(HPUX9)||defined(HPUX8)||defined(HPUX7))
#endif
#if NEED_SETENV
extern int unsetenv(const char *);
#endif
/* HPUX is missing 2 sysexits
*/
#if !defined(EX_CONFIG)
#define EX_CONFIG 78 /* Linux, BSD, Solaris have this */
#endif
#if !defined(EX_NOTFOUND)
#define EX_NOTFOUND 79 /* Solaris, and others have this */
#endif