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