1 /******************************************************************************/
2 /* SlunkCrypt, by LoRd_MuldeR <MuldeR2@GMX.de> */
3 /* This work has been released under the CC0 1.0 Universal license! */
4 /******************************************************************************/
15 # define _SH_SECURE 0x80
20 # define OS_TYPE "Windows"
21 #elif defined(__CYGWIN__)
22 # define OS_TYPE "Cygwin"
23 #elif defined(__linux__)
24 # define OS_TYPE "Linux"
25 #elif defined(__FreeBSD__)
26 # define OS_TYPE "FreeBSD"
27 #elif defined(__NetBSD__)
28 # define OS_TYPE "NetBSD"
29 #elif defined(__OpenBSD__)
30 # define OS_TYPE "OpenBSD"
32 # define OS_TYPE "Solaris"
33 #elif defined(__unix__)
34 # define OS_TYPE "Unix"
36 # error Unknown operating system!
39 #if defined(__x86_64__) || defined(_M_X64)
40 # define CPU_ARCH "x64"
41 #elif defined(__i386__) || defined(_M_IX86)
42 # define CPU_ARCH "x86"
43 #elif defined(__aarch64__) || defined(_M_ARM64)
44 # define CPU_ARCH "arm64"
45 #elif defined(__arm__) || defined(_M_ARM)
46 # define CPU_ARCH "arm"
48 # error Unknown CPU architecture!
55 # define GETENV(X) _wgetenv((X))
56 # define STRLEN(X) wcslen((X))
57 # define STRICMP(X,Y) _wcsicmp((X),(Y))
58 # define STRRCHR(X,Y) wcsrchr((X),(Y))
59 # define STRTOUL(X) wcstoul((X), NULL, 0)
60 # define FPUTS(X,Y) fputws((X),(Y))
61 # define FPRINTF(X,Y,...) fwprintf((X),(Y),__VA_ARGS__)
62 # define FOPEN(X,Y) _wfsopen((X),(Y),_SH_SECURE)
63 # ifdef __USE_MINGW_ANSI_STDIO
76 # define GETENV(X) getenv((X))
77 # define STRLEN(X) strlen((X))
78 # define STRICMP(X,Y) strcasecmp((X),(Y))
79 # define STRRCHR(X,Y) strrchr((X),(Y))
80 # define STRTOUL(X) strtoul((X), NULL, 0)
81 # define FPUTS(X,Y) fputs((X),(Y))
82 # define FPRINTF(X,Y,...) fprintf((X),(Y),__VA_ARGS__)
83 # define FOPEN(X,Y) fopen((X),(Y))
92 # define strdup(X) _strdup((X))