]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix msvc build.
authorMichael Jerris <mike@jerris.com>
Tue, 1 May 2007 23:09:06 +0000 (23:09 +0000)
committerMichael Jerris <mike@jerris.com>
Tue, 1 May 2007 23:09:06 +0000 (23:09 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5059 d0543943-73ff-0310-b7d9-9358b9ac24b2

libs/libdingaling/src/sha1.c
libs/libdingaling/src/sha1.h

index 513e4e0b7fcb27ff9cd9e76ee44124a870526feb..c54154a866b15f7030fd38888d456d558e8b1940 100644 (file)
 # endif
 #endif
 
+#ifdef _MSC_VER
+#define inline __inline
+#endif
+
 #include <string.h>
 
 #include "sha1.h"
@@ -95,7 +99,7 @@ static const char rcsid[] =
 
 static inline uint64_t _byteswap64(uint64_t x)
 {
-  uint32_t a = x >> 32;
+  uint32_t a = (uint32_t)(x >> 32);
   uint32_t b = (uint32_t) x;
   return ((uint64_t) BYTESWAP(b) << 32) | (uint64_t) BYTESWAP(a);
 }
index 7a6beb7f5dff43dfdd22f32568d5d0c9a67d7bc5..ff489fa7b952096e309861914fb855dceac27193 100644 (file)
 #else
 # if HAVE_STDINT_H
 #  include <stdint.h>
+# else\r
+#  ifndef uint32_t\r
+#   ifdef WIN32\r
+typedef unsigned __int8                uint8_t;\r
+typedef unsigned __int16       uint16_t;\r
+typedef unsigned __int32       uint32_t;\r
+typedef unsigned __int64    uint64_t;\r
+typedef __int8         int8_t;\r
+typedef __int16                int16_t;\r
+typedef __int32                int32_t;\r
+typedef __int64                int64_t;\r
+typedef unsigned long  in_addr_t;\r
+#   endif
+#  endif
 # endif
 #endif