sha1: Work around older VS compilers
authorAdam Dickmeiss <adam@indexdata.dk>
Wed, 11 Nov 2015 20:52:15 +0000 (21:52 +0100)
committerAdam Dickmeiss <adam@indexdata.dk>
Wed, 11 Nov 2015 20:52:25 +0000 (21:52 +0100)
src/wrbuf_sha1.c

index 733d8a2..16be5bd 100644 (file)
@@ -28,7 +28,12 @@ By Steve Reid <steve@edmweb.com>
 
 #define SHA1HANDSOFF
 
 
 #define SHA1HANDSOFF
 
+/* VS 2010 and later have stdint.h */
+#if defined(_MSC_VER) && _MSC_VER < 1600
+typedef unsigned int uint32_t;
+#else
 #include <stdint.h>
 #include <stdint.h>
+#endif
 
 typedef struct {
     uint32_t state[5];
 
 typedef struct {
     uint32_t state[5];