Remove obsolete $Cambridge$ CVS revision strings.
[exim.git] / src / OS / os.h-cygwin
1 /* Exim: OS-specific C header file for Cygwin */
2
3 /* This code was supplied by Pierre A. Humblet <Pierre.Humblet@ieee.org> */
4
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 *);
9 #define OS_INIT\
10 cygwin_init(argc, (char **) argv, &root_uid, &exim_uid, &exim_gid, &config_uid, &config_gid);
11
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 */
17
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
24
25 extern unsigned int cygwin_WinVersion;
26
27 #define BASE_62 36 /* Windows aliases lower and upper cases in filenames.
28 Consider reducing MAX_LOCALHOST_NUMBER */
29 #define CRYPT_H
30 #define HAVE_MMAP
31 #define HAVE_SYS_VFS_H
32 #define NO_IP_VAR_H
33 #define NO_IP_OPTIONS
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
39
40 typedef struct flock flock_t;
41
42 /* Macro to define variable length SID structures */
43 #define SID(n, name, sid...) \
44 struct { \
45 BYTE Revision; \
46 BYTE SubAuthorityCount; \
47 SID_IDENTIFIER_AUTHORITY IdentifierAuthority; \
48 DWORD SubAuthority[n]; \
49 } name = { SID_REVISION, n, {SECURITY_NT_AUTHORITY}, {sid}}
50
51 /* End */