1 /* Exim: OS-specific C header file for Cygwin */
2 /* SPDX-License-Identifier: GPL-2.0-or-later */
4 /* This code was supplied by Pierre A. Humblet <Pierre.Humblet@ieee.org>
5 December 2002. Updated Jan 2015. */
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
14 #define os_strsignal strsignal
16 #define BASE_62 36 /* Windows aliases lower and upper cases in filenames.
17 Consider reducing MAX_LOCALHOST_NUMBER */
20 #define HAVE_SYS_VFS_H
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
28 typedef struct flock flock_t;
30 /* Macro to define variable length SID structures */
31 #define SID(n, name, sid...) \
34 BYTE SubAuthorityCount; \
35 SID_IDENTIFIER_AUTHORITY IdentifierAuthority; \
36 DWORD SubAuthority[n]; \
37 } name = { SID_REVISION, n, {SECURITY_NT_AUTHORITY}, {sid}}
39 /* default is non-const */
40 #define ICONV_ARG2_TYPE const char **