[Freeswitch-svn] [commit] r5059 - freeswitch/trunk/libs/libdingaling/src

Freeswitch SVN mikej at freeswitch.org
Tue May 1 19:09:07 EDT 2007


Author: mikej
Date: Tue May  1 19:09:06 2007
New Revision: 5059

Modified:
   freeswitch/trunk/libs/libdingaling/src/sha1.c
   freeswitch/trunk/libs/libdingaling/src/sha1.h

Log:
fix msvc build.

Modified: freeswitch/trunk/libs/libdingaling/src/sha1.c
==============================================================================
--- freeswitch/trunk/libs/libdingaling/src/sha1.c	(original)
+++ freeswitch/trunk/libs/libdingaling/src/sha1.c	Tue May  1 19:09:06 2007
@@ -49,6 +49,10 @@
 # endif
 #endif
 
+#ifdef _MSC_VER
+#define inline __inline
+#endif
+
 #include <string.h>
 
 #include "sha1.h"
@@ -95,7 +99,7 @@
 
 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);
 }

Modified: freeswitch/trunk/libs/libdingaling/src/sha1.h
==============================================================================
--- freeswitch/trunk/libs/libdingaling/src/sha1.h	(original)
+++ freeswitch/trunk/libs/libdingaling/src/sha1.h	Tue May  1 19:09:06 2007
@@ -34,6 +34,20 @@
 #else
 # if HAVE_STDINT_H
 #  include <stdint.h>
+# else
+#  ifndef uint32_t
+#   ifdef WIN32
+typedef unsigned __int8		uint8_t;
+typedef unsigned __int16	uint16_t;
+typedef unsigned __int32	uint32_t;
+typedef unsigned __int64    uint64_t;
+typedef __int8		int8_t;
+typedef __int16		int16_t;
+typedef __int32		int32_t;
+typedef __int64		int64_t;
+typedef unsigned long	in_addr_t;
+#   endif
+#  endif
 # endif
 #endif
 



More information about the Freeswitch-svn mailing list