Fossil SCM

Fix compilation using MSVC 2005 and 2008.

mistachkin 2017-05-28 19:35 trunk
Commit 9766cfd5a330c7d4076ae1b3f682745c661240f18c5dca8f54d45da782db60b7
2 files changed +12 -1 -1
+12 -1
--- src/config.h
+++ src/config.h
@@ -173,11 +173,22 @@
173173
# endif
174174
#endif
175175
176176
#if !defined(_RC_COMPILE_) && !defined(SQLITE_AMALGAMATION)
177177
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
+
179190
#include "sqlite3.h"
180191
181192
/*
182193
** On Solaris, getpass() will only return up to 8 characters. getpassphrase() returns up to 257.
183194
*/
184195
--- 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 @@
1717
**
1818
** This implementation of SHA1.
1919
*/
2020
#include "config.h"
2121
#include <sys/types.h>
22
-#include <stdint.h>
2322
#include "sha1.h"
2423
2524
2625
/*
2726
** SHA1 Implementation #1 is the hardened SHA1 implementation by
2827
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button