forked from mozy/mordor
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
predef.h: indentation of #if #else #endif; replaced #ifdef LINUX by #…
…ifdef _GNU_SOURCE
- Loading branch information
Showing
1 changed file
with
38 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,67 @@ | ||
#ifndef __MORDOR_PREDEF_H__ | ||
#define __MORDOR_PREDEF_H__ | ||
# define __MORDOR_PREDEF_H__ | ||
|
||
#include "version.h" | ||
# include "version.h" | ||
|
||
#ifdef WINDOWS | ||
# ifdef WINDOWS | ||
// Get Vista+ APIs | ||
#define _WIN32_WINNT 0x0600 | ||
# define _WIN32_WINNT 0x0600 | ||
// Don't include tons of crap from windows.h | ||
#define WIN32_LEAN_AND_MEAN | ||
# define WIN32_LEAN_AND_MEAN | ||
// Define this so security.h works | ||
#define SECURITY_WIN32 | ||
# define SECURITY_WIN32 | ||
// Shut up, CRT | ||
#define _CRT_SECURE_NO_WARNINGS | ||
#define _CRT_NONSTDC_NO_WARNINGS | ||
#define _SCL_SECURE_NO_WARNINGS | ||
# define _CRT_SECURE_NO_WARNINGS | ||
# define _CRT_NONSTDC_NO_WARNINGS | ||
# define _SCL_SECURE_NO_WARNINGS | ||
|
||
// Use more common names for functions | ||
// (cross-platform 64-bit, strip the underscores) | ||
#define atoll _atoi64 | ||
#define strtoll _strtoi64 | ||
#define strtoull _strtoui64 | ||
#define strnicmp _strnicmp | ||
#define mkdir _mkdir | ||
#define snprintf _snprintf | ||
# define atoll _atoi64 | ||
# define strtoll _strtoi64 | ||
# define strtoull _strtoui64 | ||
# define strnicmp _strnicmp | ||
# define mkdir _mkdir | ||
# define snprintf _snprintf | ||
|
||
#include <ntstatus.h> | ||
#define WIN32_NO_STATUS | ||
#include <windows.h> | ||
#include <ws2tcpip.h> | ||
# include <ntstatus.h> | ||
# define WIN32_NO_STATUS | ||
# include <windows.h> | ||
# include <ws2tcpip.h> | ||
|
||
// Take things out of the preprocessor, and put into the global namespace | ||
// From WinGDI.h: #define ERROR 0 | ||
#ifdef ERROR | ||
#undef ERROR | ||
# ifdef ERROR | ||
# undef ERROR | ||
enum { | ||
ERROR = 0 | ||
}; | ||
#endif | ||
# endif | ||
|
||
// From WinNT.h: #define DELETE (0x00010000L) | ||
#ifdef DELETE | ||
#undef DELETE | ||
# ifdef DELETE | ||
# undef DELETE | ||
enum { | ||
DELETE = (0x00010000L) | ||
}; | ||
#endif | ||
# endif | ||
|
||
#else | ||
#ifdef LINUX | ||
#include <sys/sysmacros.h> | ||
# else // WINDOWS | ||
# ifdef _GNU_SOURCE | ||
# include <sys/sysmacros.h> | ||
|
||
#ifdef major | ||
#undef major | ||
#endif | ||
#ifdef minor | ||
#undef minor | ||
#endif | ||
#endif | ||
# ifdef major | ||
# undef major | ||
# endif | ||
# ifdef minor | ||
# undef minor | ||
# endif | ||
# endif | ||
|
||
#define stricmp strcasecmp | ||
#define strnicmp strncasecmp | ||
# define stricmp strcasecmp | ||
# define strnicmp strncasecmp | ||
|
||
#endif | ||
# endif // WINDOWS | ||
|
||
|
||
#endif |