소스 검색

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 */
 #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
 # if ( __BYTE_ORDER != __LITTLE_ENDIAN )
 #  define UA_NON_LITTLEENDIAN_ARCHITECTURE
 # 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
 
 /* Force non-little endian manually by setting the following. */