4coder/4coder_os_comp_cracking.h

63 lines
1.1 KiB
C
Raw Normal View History

2017-04-01 06:15:33 +00:00
/*
* Mr. 4th Dimention - Allen Webster
*
* 31.03.2017
*
* OS & Compiler cracking for 4coder
*
*/
// TOP
2017-11-21 21:30:40 +00:00
#if !defined(FCODER_OS_COMP_CRACKING_H)
#define FCODER_OS_COMP_CRACKING_H
2017-04-01 06:15:33 +00:00
#if defined(_MSC_VER) /* COMPILER */
2017-04-01 06:15:33 +00:00
# define IS_CL
// NOTE(allen): I suspect snprintf is defined in VS 2015 (I test on 2017)
#if _MSC_VER <= 1800
2017-04-01 06:15:33 +00:00
# define snprintf _snprintf
#endif
2017-04-01 06:15:33 +00:00
# if defined(_WIN32) /* OS */
2017-04-01 06:15:33 +00:00
# define IS_WINDOWS
# pragma comment(lib, "Kernel32.lib")
# else
# error This compiler/platform combo is not supported yet
# endif
2017-11-21 21:30:40 +00:00
# if defined(_M_AMD64) /* Architecture */
# define CALL_CONVENTION
# define BUILD_X64
# elif defined(_M_IX86)
# define CALL_CONVENTION __stdcall
# define BUILD_X86
# else
# error architecture not supported yet
# endif
2017-04-01 06:15:33 +00:00
#elif defined(__GNUC__) || defined(__GNUG__)
# define IS_GCC /* COMPILER */
2017-04-01 06:15:33 +00:00
# if defined(__gnu_linux__) /* OS */
2017-04-01 06:15:33 +00:00
# define IS_LINUX
2017-11-10 21:21:57 +00:00
# define CALL_CONVENTION
# elif defined(__APPLE__) && defined(__MACH__) /* OS */
# define IS_MAC
2017-11-10 21:21:57 +00:00
# define CALL_CONVENTION
#else
2017-04-01 06:15:33 +00:00
# error This compiler/platform combo is not supported yet
# endif
#else
2017-11-21 21:30:40 +00:00
# error This compiler is not supported yet
2017-04-01 06:15:33 +00:00
#endif
#endif
// BOTTOM