Created
January 22, 2013 19:46
-
-
Save PilzAdam/4597790 to your computer and use it in GitHub Desktop.
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
diff --git a/src/porting.h b/src/porting.h | |
index 184e1ab..15e7629 100644 | |
--- a/src/porting.h | |
+++ b/src/porting.h | |
@@ -39,7 +39,7 @@ | |
//template<typename T> struct alignment_trick { char c; T member; }; | |
//#define ALIGNOF(type) offsetof (alignment_trick<type>, member) | |
-#ifdef _WIN32 | |
+#ifdef _MSC_VER | |
#include <windows.h> | |
#define ALIGNOF(x) __alignof(x) | |
@@ -56,6 +56,10 @@ | |
#define sleep_ms(x) usleep(x*1000) | |
#endif | |
+#if defined(_WIN32) && defined(__GNUC__) | |
+ #define strtok_r(s,d,p) strtok(s,d) | |
+#endif | |
+ | |
#define PADDING(x, y) ((ALIGNOF(y) - ((uintptr_t)(x) & (ALIGNOF(y) - 1))) & (ALIGNOF(y) - 1)) | |
namespace porting |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment