1 /* Exim: OS-specific C header file for Cygwin */
3 /* This code was supplied by Pierre A. Humblet <Pierre.Humblet@ieee.org> */
5 /* Define the OS_INIT macro that we insert in exim.c:main()
6 to set the root and exim uid depending on the system */
7 /* We use a special routine to initialize */
8 void cygwin_init(int, char **, void *, void *, void *, void *, void *);
10 cygwin_init(argc, (char **) argv, &root_uid, &exim_uid, &exim_gid, &config_uid, &config_gid);
12 /* We need a special mkdir that
13 allows names starting with // */
14 #include <sys/stat.h> /* Do not redefine mkdir in sys/stat.h */
15 int cygwin_mkdir( const char *_path, mode_t __mode );
16 #define mkdir cygwin_mkdir /* redefine mkdir elsewhere */
18 /* Redefine the set*id calls to run when faking root */
19 #include <unistd.h> /* Do not redefine in unitsd.h */
20 int cygwin_setuid(uid_t uid );
21 int cygwin_setgid(gid_t gid );
22 #define setuid cygwin_setuid
23 #define setgid cygwin_setgid
25 extern unsigned int cygwin_WinVersion;
27 #define BASE_62 36 /* Windows aliases lower and upper cases in filenames.
28 Consider reducing MAX_LOCALHOST_NUMBER */
31 #define HAVE_SYS_VFS_H
34 #define F_FREESP O_TRUNC
35 /* Defining LOAD_AVG_NEEDS_ROOT causes an initial
36 call to os_getloadavg. In our case this is beneficial
37 because it initializes the counts */
38 #define LOAD_AVG_NEEDS_ROOT
40 typedef struct flock flock_t;
42 /* Macro to define variable length SID structures */
43 #define SID(n, name, sid...) \
46 BYTE SubAuthorityCount; \
47 SID_IDENTIFIER_AUTHORITY IdentifierAuthority; \
48 DWORD SubAuthority[n]; \
49 } name = { SID_REVISION, n, {SECURITY_NT_AUTHORITY}, {sid}}