AC_C_BIGENDIAN 사용
authorChoe Hwanjin <choe.hwanjin@gmail.com>
Wed, 11 Jul 2007 14:36:13 +0000 (23:36 +0900)
committerChoe Hwanjin <choe.hwanjin@gmail.com>
Wed, 11 Jul 2007 14:36:13 +0000 (23:36 +0900)
git-svn-id: http://kldp.net/svn/hangul/libhangul/trunk@132 8f00fcd2-89fc-0310-932e-b01be5b65e01

configure.ac
test/hangul.c

index 6969551..09b5ac6 100644 (file)
@@ -30,6 +30,7 @@ AC_CHECK_HEADERS([stdlib.h string.h])
 
 # Checks for typedefs, structures, and compiler characteristics.
 AC_HEADER_STDBOOL
+AC_C_BIGENDIAN
 AC_C_CONST
 AC_C_INLINE
 AC_TYPE_UINT32_T
index b44b76c..d9a0f30 100644 (file)
@@ -1,15 +1,18 @@
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <iconv.h>
-#include <endian.h>
 
 #include "../hangul/hangul.h"
 
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-#define UCS4 "UCS-4LE"
-#else
+#ifdef WORDS_BIGENDIAN
 #define UCS4 "UCS-4BE"
+#else
+#define UCS4 "UCS-4LE"
 #endif
 
 bool filter(ucschar *str, ucschar cho, ucschar jung, ucschar jong, void *data)