Browse Source

Merge pull request #63 from tbeu/fix-stdint-inclusion

Always include stdint.h on MinGW, Cygwin and for GNU C
Troy D. Hanson 10 years ago
parent
commit
630ff34c25
1 changed files with 6 additions and 3 deletions
  1. 6 3
      src/uthash.h

+ 6 - 3
src/uthash.h

@@ -60,17 +60,20 @@ do {
 #endif
 
 /* a number of the hash function use uint32_t which isn't defined on Pre VS2010 */
-#if defined (_WIN32)
+#if defined(_WIN32)
 #if defined(_MSC_VER) && _MSC_VER >= 1600
 #include <stdint.h>
-#elif defined(__WATCOMC__)
+#elif defined(__WATCOMC__) || defined(__MINGW32__) || defined(__CYGWIN__)
 #include <stdint.h>
 #else
 typedef unsigned int uint32_t;
 typedef unsigned char uint8_t;
 #endif
-#else
+#elif defined(__GNUC__) && !defined(__VXWORKS__)
 #include <stdint.h>
+#else
+typedef unsigned int uint32_t;
+typedef unsigned char uint8_t;
 #endif
 
 #define UTHASH_VERSION 1.9.9