Merge branch 'exim-4.96+security' into master+security
[exim.git] / src / OS / unsupported / os.h-cygwin
1 /* Exim: OS-specific C header file for Cygwin */
2 /* SPDX-License-Identifier: GPL-2.0-or-later */
3
4 /* This code was supplied by Pierre A. Humblet <Pierre.Humblet@ieee.org>
5    December 2002. Updated Jan 2015. */
6
7 /* Redefine the set*id calls to run when faking root */
8 #include <unistd.h>   /* Do not redefine in unitsd.h */
9 int cygwin_setuid(uid_t uid );
10 int cygwin_setgid(gid_t gid );
11 #define setuid cygwin_setuid
12 #define setgid cygwin_setgid
13
14 #define os_strsignal strsignal
15 #define OS_STRSIGNAL
16 #define BASE_62 36  /* Windows aliases lower and upper cases in filenames.
17                        Consider reducing MAX_LOCALHOST_NUMBER */
18 #define CRYPT_H
19 #define HAVE_MMAP
20 #define HAVE_SYS_VFS_H
21 #define NO_IP_VAR_H
22 #define NO_IP_OPTIONS
23 /* Defining LOAD_AVG_NEEDS_ROOT causes an initial
24    call to os_getloadavg. In our case this is beneficial
25    because it initializes the counts */
26 #define LOAD_AVG_NEEDS_ROOT
27
28 typedef struct flock flock_t;
29
30 /* Macro to define variable length SID structures */
31 #define SID(n, name, sid...) \
32 struct  { \
33   BYTE  Revision; \
34   BYTE  SubAuthorityCount; \
35   SID_IDENTIFIER_AUTHORITY IdentifierAuthority; \
36   DWORD SubAuthority[n]; \
37 } name = { SID_REVISION, n, {SECURITY_NT_AUTHORITY}, {sid}}
38
39 /* default is non-const */
40 #define ICONV_ARG2_TYPE const char **
41
42 /* End */