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
|
/* $Cambridge: exim/src/OS/os.h-cygwin,v 1.2 2005/05/24 08:15:01 tom Exp $ */
/* Exim: OS-specific C header file for Cygwin */
/* This code was supplied by Pierre A. Humblet <Pierre.Humblet@ieee.org> */
/* Define the OS_INIT macro that we insert in exim.c:main()
to set the root and exim uid depending on the system */
/* We use a special routine to initialize */
void cygwin_init(int, char **, void *, void *, void *, void *);
#define OS_INIT\
cygwin_init(argc, (char **) argv, &root_uid, &exim_uid, &exim_gid, &config_uid);
/* We need a special mkdir that
allows names starting with // */
#include <sys/stat.h> /* Do not redefine mkdir in sys/stat.h */
int cygwin_mkdir( const char *_path, mode_t __mode );
#define mkdir cygwin_mkdir /* redefine mkdir elsewhere */
/* Redefine the set*id calls to run when faking root */
#include <unistd.h> /* Do not redefine in unitsd.h */
int cygwin_setuid(uid_t uid );
int cygwin_setgid(gid_t gid );
#define setuid cygwin_setuid
#define setgid cygwin_setgid
extern unsigned int cygwin_WinVersion;
#define BASE_62 36 /* Windows aliases lower and upper cases in filenames.
Consider reducing MAX_LOCALHOST_NUMBER */
#define CRYPT_H
#define HAVE_MMAP
#define HAVE_SYS_VFS_H
#define NO_IP_VAR_H
#define NO_IP_OPTIONS
#define F_FREESP O_TRUNC
/* Defining LOAD_AVG_NEEDS_ROOT causes an initial
call to os_getloadavg. In our case this is beneficial
because it initializes the counts */
#define LOAD_AVG_NEEDS_ROOT
typedef struct flock flock_t;
/* Macro to define variable length SID structures */
#define SID(n, name, sid...) \
struct { \
BYTE Revision; \
BYTE SubAuthorityCount; \
SID_IDENTIFIER_AUTHORITY IdentifierAuthority; \
DWORD SubAuthority[n]; \
} name = { SID_REVISION, n, {SECURITY_NT_AUTHORITY}, {sid}}
/* End */
|