瀏覽代碼

fix win32

fix
Julius Pfrommer 9 年之前
父節點
當前提交
273a7d572f
共有 1 個文件被更改,包括 13 次插入6 次删除
  1. 13 6
      include/ua_config.h.in

+ 13 - 6
include/ua_config.h.in

@@ -44,16 +44,23 @@
 
 
 /* Endianness */
 /* Endianness */
 #if defined(__linux__) || defined(__APPLE__)
 #if defined(__linux__) || defined(__APPLE__)
-#  ifndef __QNX__
-#    if defined(__APPLE__) || defined(__MACH__)
-#     include <machine/endian.h>
-#    else
-#     include <endian.h>
-#    endif
+# ifndef __QNX__
+#  if defined(__APPLE__) || defined(__MACH__)
+#   include <machine/endian.h>
+#  else
+#   include <endian.h>
 #  endif
 #  endif
+# endif
 # if ( __BYTE_ORDER != __LITTLE_ENDIAN )
 # if ( __BYTE_ORDER != __LITTLE_ENDIAN )
 #  define UA_NON_LITTLEENDIAN_ARCHITECTURE
 #  define UA_NON_LITTLEENDIAN_ARCHITECTURE
 # endif
 # endif
+#elif _WIN32
+# define htole16(x) (x)
+# define htole32(x) (x)
+# define htole64(x) (x)
+# define le16toh(x) (x)
+# define le32toh(x) (x)
+# define le64toh(x) (x)
 #endif
 #endif
 
 
 /* Force non-little endian manually by setting the following. */
 /* Force non-little endian manually by setting the following. */