[Freeswitch-svn] [commit] r3088 - in freeswitch/trunk: libs/iax/src libs/libdingaling/src src/include
Freeswitch SVN
mikej at freeswitch.org
Wed Oct 18 21:21:18 EDT 2006
Author: mikej
Date: Wed Oct 18 21:21:17 2006
New Revision: 3088
Modified:
freeswitch/trunk/libs/iax/src/md5.c
freeswitch/trunk/libs/libdingaling/src/sha1.c
freeswitch/trunk/src/include/switch_platform.h
Log:
add endian defines on MSVC
Modified: freeswitch/trunk/libs/iax/src/md5.c
==============================================================================
--- freeswitch/trunk/libs/iax/src/md5.c (original)
+++ freeswitch/trunk/libs/iax/src/md5.c Wed Oct 18 21:21:17 2006
@@ -23,6 +23,18 @@
# endif
#endif
+#ifdef _MSC_VER
+#ifndef __LITTLE_ENDIAN
+#define __LITTLE_ENDIAN 1234
+#endif
+#ifndef __BIG_ENDIAN
+#define __BIG_ENDIAN 4321
+#endif
+#ifndef __BYTE_ORDER
+#define __BYTE_ORDER __LITTLE_ENDIAN
+#endif
+#endif
+
#if __BYTE_ORDER == __BIG_ENDIAN || BYTE_ORDER == BIG_ENDIAN
# define HIGHFIRST 1
#elif __BYTE_ORDER == __LITTLE_ENDIAN || BYTE_ORDER == LITLE_ENDIAN
Modified: freeswitch/trunk/libs/libdingaling/src/sha1.c
==============================================================================
--- freeswitch/trunk/libs/libdingaling/src/sha1.c (original)
+++ freeswitch/trunk/libs/libdingaling/src/sha1.c Wed Oct 18 21:21:17 2006
@@ -54,7 +54,19 @@
#include <stdio.h>
#include <string.h>
+#ifdef _MSC_VER
+#ifndef __LITTLE_ENDIAN
+#define __LITTLE_ENDIAN 1234
+#endif
+#ifndef __BIG_ENDIAN
+#define __BIG_ENDIAN 4321
+#endif
+#ifndef __BYTE_ORDER
+#define __BYTE_ORDER __LITTLE_ENDIAN
+#endif
+#else
#include "config.h"
+#endif
#include "sha1.h"
#define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits))))
Modified: freeswitch/trunk/src/include/switch_platform.h
==============================================================================
--- freeswitch/trunk/src/include/switch_platform.h (original)
+++ freeswitch/trunk/src/include/switch_platform.h Wed Oct 18 21:21:17 2006
@@ -60,6 +60,16 @@
*/
#pragma warning(disable:4152 4054 4100 4142 4200 4204 4706 4055 4214 4819 4132 4510 4512 4610)
+#ifndef __LITTLE_ENDIAN
+#define __LITTLE_ENDIAN 1234
+#endif
+#ifndef __BIG_ENDIAN
+#define __BIG_ENDIAN 4321
+#endif
+#ifndef __BYTE_ORDER
+#define __BYTE_ORDER __LITTLE_ENDIAN
+#endif
+
#if (_MSC_VER >= 1400) // VC8+
#ifndef _CRT_SECURE_NO_DEPRECATE
#define _CRT_SECURE_NO_DEPRECATE
More information about the Freeswitch-svn
mailing list