From cdbb0b419d7e4c9caa2821ef04ec92fa636a6e80 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Sat, 13 Dec 2008 00:25:48 +0000 Subject: [PATCH] fixed autoconf and source files to use ASE_HAVE_CONFIG_H --- ase/cmd/awk/x.awk | 1 + ase/configure | 168 ++++++++++++++++++++++++++++-------- ase/configure.ac | 73 ++++++++-------- ase/include/ase/makefile.am | 1 + ase/include/ase/makefile.in | 1 + ase/include/ase/types.h | 7 +- ase/lib/cmn/fio.c | 22 ++++- 7 files changed, 196 insertions(+), 77 deletions(-) diff --git a/ase/cmd/awk/x.awk b/ase/cmd/awk/x.awk index d348324a..413ff2b8 100644 --- a/ase/cmd/awk/x.awk +++ b/ase/cmd/awk/x.awk @@ -25,6 +25,7 @@ BEGIN { print 0.0; print 10; + print "wide characteter 넓은 문자"; print fflush ("abc"); } diff --git a/ase/configure b/ase/configure index 2bfee4e8..f9b0bb9a 100755 --- a/ase/configure +++ b/ase/configure @@ -20213,6 +20213,102 @@ else RM="$ac_cv_prog_RM" fi +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}sed", so it can be a program name with args. +set dummy ${ac_tool_prefix}sed; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_SED+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$SED"; then + ac_cv_prog_SED="$SED" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_SED="${ac_tool_prefix}sed" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +SED=$ac_cv_prog_SED +if test -n "$SED"; then + { echo "$as_me:$LINENO: result: $SED" >&5 +echo "${ECHO_T}$SED" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_SED"; then + ac_ct_SED=$SED + # Extract the first word of "sed", so it can be a program name with args. +set dummy sed; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_SED+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_SED"; then + ac_cv_prog_ac_ct_SED="$ac_ct_SED" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_SED="sed" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_SED=$ac_cv_prog_ac_ct_SED +if test -n "$ac_ct_SED"; then + { echo "$as_me:$LINENO: result: $ac_ct_SED" >&5 +echo "${ECHO_T}$ac_ct_SED" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_SED" = x; then + SED="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + SED=$ac_ct_SED + fi +else + SED="$ac_cv_prog_SED" +fi + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcj", so it can be a program name with args. set dummy ${ac_tool_prefix}gcj; ac_word=$2 @@ -20310,44 +20406,44 @@ else fi -if test "$ac_test_CFLAGS" = "set" -then - CFLAGS=$ac_save_CFLAGS -else - if test "$GCC" = "yes" - then - CFLAGS="-O2" - else - CFLAGS= - fi -fi +#if test "$ac_test_CFLAGS" = "set" +#then +# CFLAGS=$ac_save_CFLAGS +#else +# if test "$GCC" = "yes" +# then +# CFLAGS="-O2" +# else +# CFLAGS= +# fi +#fi -if test "$ac_test_CXXFLAGS" = "set" -then - CXXFLAGS=$ac_save_CXXFLAGS -else - if test "$GCC" = "yes" - then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi +#if test "$ac_test_CXXFLAGS" = "set" +#then +# CXXFLAGS=$ac_save_CXXFLAGS +#else +# if test "$GCC" = "yes" +# then +# CXXFLAGS="-O2" +# else +# CXXFLAGS= +# fi +#fi +# +#if test "$ac_test_CJFLAGS" = "set" +#then +# CJFLAGS=$ac_save_CJFLAGS +#else +# if test "$CJ" = "gcj" +# then +# CJFLAGS="-O2" +# else +# CJFLAGS= +# fi +#fi -if test "$ac_test_CJFLAGS" = "set" -then - CJFLAGS=$ac_save_CJFLAGS -else - if test "$CJ" = "gcj" - then - CJFLAGS="-O2" - else - CJFLAGS= - fi -fi - -CFLAGS="$CFLAGS -D_LARGEFILE64_SOURCE" -CXXFLAGS="$CXXFLAGS -D_LARGEFILE64_SOURCE" +CFLAGS="$CFLAGS -D_LARGEFILE64_SOURCE -DASE_HAVE_CONFIG_H" +CXXFLAGS="$CXXFLAGS -D_LARGEFILE64_SOURCE -DASE_HAVE_CONFIG_H" LIBM= case $host in diff --git a/ase/configure.ac b/ase/configure.ac index fcc8c0d2..054d4882 100644 --- a/ase/configure.ac +++ b/ase/configure.ac @@ -26,48 +26,49 @@ AC_CHECK_TOOL(AR, ar) AC_CHECK_TOOL(GREP, grep) AC_CHECK_TOOL(RM, rm) +AC_CHECK_TOOL(SED, sed) AC_CHECK_TOOL(CJ, gcj) dnl overrides the default CFLAGS setting -if test "$ac_test_CFLAGS" = "set" -then - CFLAGS=$ac_save_CFLAGS -else - if test "$GCC" = "yes" - then - CFLAGS="-O2" - else - CFLAGS= - fi -fi +#if test "$ac_test_CFLAGS" = "set" +#then +# CFLAGS=$ac_save_CFLAGS +#else +# if test "$GCC" = "yes" +# then +# CFLAGS="-O2" +# else +# CFLAGS= +# fi +#fi -if test "$ac_test_CXXFLAGS" = "set" -then - CXXFLAGS=$ac_save_CXXFLAGS -else - if test "$GCC" = "yes" - then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi - -if test "$ac_test_CJFLAGS" = "set" -then - CJFLAGS=$ac_save_CJFLAGS -else - if test "$CJ" = "gcj" - then - CJFLAGS="-O2" - else - CJFLAGS= - fi -fi +#if test "$ac_test_CXXFLAGS" = "set" +#then +# CXXFLAGS=$ac_save_CXXFLAGS +#else +# if test "$GCC" = "yes" +# then +# CXXFLAGS="-O2" +# else +# CXXFLAGS= +# fi +#fi +# +#if test "$ac_test_CJFLAGS" = "set" +#then +# CJFLAGS=$ac_save_CJFLAGS +#else +# if test "$CJ" = "gcj" +# then +# CJFLAGS="-O2" +# else +# CJFLAGS= +# fi +#fi dnl make visible the 64bit interface to the file system -CFLAGS="$CFLAGS -D_LARGEFILE64_SOURCE" -CXXFLAGS="$CXXFLAGS -D_LARGEFILE64_SOURCE" +CFLAGS="$CFLAGS -D_LARGEFILE64_SOURCE -DASE_HAVE_CONFIG_H" +CXXFLAGS="$CXXFLAGS -D_LARGEFILE64_SOURCE -DASE_HAVE_CONFIG_H" dnl Checks for the math library (is -lm needed?) AC_CHECK_LIBM diff --git a/ase/include/ase/makefile.am b/ase/include/ase/makefile.am index 168aa5c1..fa8481a9 100644 --- a/ase/include/ase/makefile.am +++ b/ase/include/ase/makefile.am @@ -11,6 +11,7 @@ CLEANFILES = *dist install-data-hook: @"$(GREP)" -E "#define[ ]+ASE_" "$(srcdir)/config.h" > "$(pkgincludedir)/config.h" @"$(RM)" -f "$(pkgincludedir)/config.h.in" + @"$(SED)" 's|/\*#define ASE_HAVE_CONFIG_H\*/|#define ASE_HAVE_CONFIG_H|' "$(srcdir)/types.h" > "$(pkgincludedir)/types.h" uninstall-hook: @"$(RM)" -f "$(pkgincludedir)/config.h" diff --git a/ase/include/ase/makefile.in b/ase/include/ase/makefile.in index 023527b0..870cc990 100644 --- a/ase/include/ase/makefile.in +++ b/ase/include/ase/makefile.in @@ -554,6 +554,7 @@ uninstall-am: uninstall-pkgincludeHEADERS install-data-hook: @"$(GREP)" -E "#define[ ]+ASE_" "$(srcdir)/config.h" > "$(pkgincludedir)/config.h" @"$(RM)" -f "$(pkgincludedir)/config.h.in" + @"$(SED)" 's|/\*#define ASE_HAVE_CONFIG_H\*/|#define ASE_HAVE_CONFIG_H|' "$(srcdir)/types.h" > "$(pkgincludedir)/types.h" uninstall-hook: @"$(RM)" -f "$(pkgincludedir)/config.h" diff --git a/ase/include/ase/types.h b/ase/include/ase/types.h index e1154511..68920b5c 100644 --- a/ase/include/ase/types.h +++ b/ase/include/ase/types.h @@ -1,5 +1,5 @@ /* - * $Id: types.h 468 2008-12-10 10:19:59Z baconevi $ + * $Id: types.h 476 2008-12-12 06:25:48Z baconevi $ * * {License} */ @@ -17,7 +17,10 @@ ****** */ -#if defined(HAVE_CONFIG_H) +/* WARNING: NEVER CHANGE/DELETE THE FOLLOWING LINE */ +/*#define ASE_HAVE_CONFIG_H*/ + +#if defined(ASE_HAVE_CONFIG_H) #include #elif defined(_WIN32) #include diff --git a/ase/lib/cmn/fio.c b/ase/lib/cmn/fio.c index 57aaf5a5..61b77b72 100644 --- a/ase/lib/cmn/fio.c +++ b/ase/lib/cmn/fio.c @@ -219,10 +219,23 @@ ase_fio_off_t ase_fio_seek ( ASE_ASSERT (AES_SIZEOF(offset) <= AES_SIZEOF(x.QuadPart)); x.QuadPart = offset; - if (SetFilePointerEx ( - fio->handle, x, &y, seek_map[origin]) == FALSE) return -1; + if (SetFilePointerEx (fio->handle, x, &y, seek_map[origin]) == FALSE) + { + return (ase_fio_off_t)-1; + } return (ase_fio_off_t)y.QuadPart; + + /* + x.QuadPart = offset; + x.LowPart = SetFilePointer (fio->handle, x.LowPart, &x.HighPart, seek_map[origin]); + if (x.LowPart == INVALID_SET_FILE_POINTER && GetLastError() != NO_ERROR) + { + return (ase_fio_off_t)-1; + } + + return (ase_fio_off_t)x.QuadPart; + */ #else static int seek_map[] = @@ -239,7 +252,10 @@ ase_fio_off_t ase_fio_seek ( (unsigned long)(offset>>32), (unsigned long)(offset&0xFFFFFFFFlu), &tmp, - seek_map[origin]) == -1) return -1; + seek_map[origin]) == -1) + { + return (ase_fio_off_t)-1; + } return (ase_fio_off_t)tmp;