Fossil SCM
Fix compilation using MSVC 2005 and 2008.
Commit
9766cfd5a330c7d4076ae1b3f682745c661240f18c5dca8f54d45da782db60b7
Parent
6d4aa3445735b81…
2 files changed
+12
-1
-1
+12
-1
| --- src/config.h | ||
| +++ src/config.h | ||
| @@ -173,11 +173,22 @@ | ||
| 173 | 173 | # endif |
| 174 | 174 | #endif |
| 175 | 175 | |
| 176 | 176 | #if !defined(_RC_COMPILE_) && !defined(SQLITE_AMALGAMATION) |
| 177 | 177 | |
| 178 | -#include <stdint.h> | |
| 178 | +/* | |
| 179 | +** MSVC does not include the "stdint.h" header file until 2010. | |
| 180 | +*/ | |
| 181 | +#if defined(_MSC_VER) && _MSC_VER<1600 | |
| 182 | + typedef __int32 int32_t; | |
| 183 | + typedef unsigned __int32 uint32_t; | |
| 184 | + typedef __int64 int64_t; | |
| 185 | + typedef unsigned __int64 uint64_t; | |
| 186 | +#else | |
| 187 | +# include <stdint.h> | |
| 188 | +#endif | |
| 189 | + | |
| 179 | 190 | #include "sqlite3.h" |
| 180 | 191 | |
| 181 | 192 | /* |
| 182 | 193 | ** On Solaris, getpass() will only return up to 8 characters. getpassphrase() returns up to 257. |
| 183 | 194 | */ |
| 184 | 195 |
| --- src/config.h | |
| +++ src/config.h | |
| @@ -173,11 +173,22 @@ | |
| 173 | # endif |
| 174 | #endif |
| 175 | |
| 176 | #if !defined(_RC_COMPILE_) && !defined(SQLITE_AMALGAMATION) |
| 177 | |
| 178 | #include <stdint.h> |
| 179 | #include "sqlite3.h" |
| 180 | |
| 181 | /* |
| 182 | ** On Solaris, getpass() will only return up to 8 characters. getpassphrase() returns up to 257. |
| 183 | */ |
| 184 |
| --- src/config.h | |
| +++ src/config.h | |
| @@ -173,11 +173,22 @@ | |
| 173 | # endif |
| 174 | #endif |
| 175 | |
| 176 | #if !defined(_RC_COMPILE_) && !defined(SQLITE_AMALGAMATION) |
| 177 | |
| 178 | /* |
| 179 | ** MSVC does not include the "stdint.h" header file until 2010. |
| 180 | */ |
| 181 | #if defined(_MSC_VER) && _MSC_VER<1600 |
| 182 | typedef __int32 int32_t; |
| 183 | typedef unsigned __int32 uint32_t; |
| 184 | typedef __int64 int64_t; |
| 185 | typedef unsigned __int64 uint64_t; |
| 186 | #else |
| 187 | # include <stdint.h> |
| 188 | #endif |
| 189 | |
| 190 | #include "sqlite3.h" |
| 191 | |
| 192 | /* |
| 193 | ** On Solaris, getpass() will only return up to 8 characters. getpassphrase() returns up to 257. |
| 194 | */ |
| 195 |
-1
| --- src/sha1.c | ||
| +++ src/sha1.c | ||
| @@ -17,11 +17,10 @@ | ||
| 17 | 17 | ** |
| 18 | 18 | ** This implementation of SHA1. |
| 19 | 19 | */ |
| 20 | 20 | #include "config.h" |
| 21 | 21 | #include <sys/types.h> |
| 22 | -#include <stdint.h> | |
| 23 | 22 | #include "sha1.h" |
| 24 | 23 | |
| 25 | 24 | |
| 26 | 25 | /* |
| 27 | 26 | ** SHA1 Implementation #1 is the hardened SHA1 implementation by |
| 28 | 27 |
| --- src/sha1.c | |
| +++ src/sha1.c | |
| @@ -17,11 +17,10 @@ | |
| 17 | ** |
| 18 | ** This implementation of SHA1. |
| 19 | */ |
| 20 | #include "config.h" |
| 21 | #include <sys/types.h> |
| 22 | #include <stdint.h> |
| 23 | #include "sha1.h" |
| 24 | |
| 25 | |
| 26 | /* |
| 27 | ** SHA1 Implementation #1 is the hardened SHA1 implementation by |
| 28 |
| --- src/sha1.c | |
| +++ src/sha1.c | |
| @@ -17,11 +17,10 @@ | |
| 17 | ** |
| 18 | ** This implementation of SHA1. |
| 19 | */ |
| 20 | #include "config.h" |
| 21 | #include <sys/types.h> |
| 22 | #include "sha1.h" |
| 23 | |
| 24 | |
| 25 | /* |
| 26 | ** SHA1 Implementation #1 is the hardened SHA1 implementation by |
| 27 |