From 20427c6b9b8288eef21c79df4f60b85cf04a39a7 Mon Sep 17 00:00:00 2001 From: Benjamin Kosnik Date: Sun, 2 Jul 2000 02:16:35 +0000 Subject: [PATCH] Sync libio to glibc-2.2 current CVS. 2000-07-01 Benjamin Kosnik Ulrich Drepper Sync libio to glibc-2.2 current CVS. * libio/_G_config.h: New file. * libio/wfileops.c: New file. * libio/wfiledoalloc.c: New file. * libio/wgenops.c: New file. * libio/iofwide.c: New file. * libio/Makefile.am: Tweaks. * libio/Makefile.in: Regenerate. * libio/gen-params: Remove. Generic replacement for this yet undone. * libio/[filedoalloc.c, fileops.c, genops.c, iolibio.h, libio.h, libioP.h, stdfiles.c]: Update. * config/c_io_libio.cc: Tweaks. * acinclude.m4: Complete hacks to test wide io. * aclocal.m4: Regenerate. * configure: Regenerate. * src/Makefile.am: Update. * src/Makefile.in: Regenerate. * math/cargl.c: Remove underscores. * bits/locale_facets.h: Tweaks. Start adding iconv details and notes. * bits/locale_facets.tcc: Tweaks. * bits/std_cwchar.h: Tweaks. Co-Authored-By: Ulrich Drepper From-SVN: r34822 --- libstdc++-v3/ChangeLog | 30 +- libstdc++-v3/acinclude.m4 | 10 + libstdc++-v3/aclocal.m4 | 10 + libstdc++-v3/bits/locale_facets.h | 75 +- libstdc++-v3/bits/locale_facets.tcc | 2 +- libstdc++-v3/bits/std_cwchar.h | 6 +- libstdc++-v3/config/c_io_libio.cc | 6 +- libstdc++-v3/configure | 1862 ++++++++++++++------------- libstdc++-v3/libio/Makefile.am | 52 +- libstdc++-v3/libio/Makefile.in | 66 +- libstdc++-v3/libio/_G_config.h | 130 ++ libstdc++-v3/libio/filedoalloc.c | 42 +- libstdc++-v3/libio/fileops.c | 593 ++++++--- libstdc++-v3/libio/gen-params | 751 ----------- libstdc++-v3/libio/genops.c | 341 +++-- libstdc++-v3/libio/iofwide.c | 472 +++++++ libstdc++-v3/libio/iolibio.h | 31 +- libstdc++-v3/libio/libio.h | 312 +++-- libstdc++-v3/libio/libioP.h | 416 ++++-- libstdc++-v3/libio/stdfiles.c | 55 +- libstdc++-v3/libio/wfiledoalloc.c | 105 ++ libstdc++-v3/libio/wfileops.c | 734 +++++++++++ libstdc++-v3/libio/wgenops.c | 750 +++++++++++ libstdc++-v3/math/cargl.c | 2 +- libstdc++-v3/src/Makefile.am | 2 +- libstdc++-v3/src/Makefile.in | 2 +- 26 files changed, 4565 insertions(+), 2292 deletions(-) create mode 100644 libstdc++-v3/libio/_G_config.h delete mode 100755 libstdc++-v3/libio/gen-params create mode 100644 libstdc++-v3/libio/iofwide.c create mode 100644 libstdc++-v3/libio/wfiledoalloc.c create mode 100644 libstdc++-v3/libio/wfileops.c create mode 100644 libstdc++-v3/libio/wgenops.c diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index e6025c7a877a..d98deaf37f10 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,31 @@ +2000-07-01 Benjamin Kosnik + Ulrich Drepper + + Sync libio to glibc-2.2 current CVS. + * libio/_G_config.h: New file. + * libio/wfileops.c: New file. + * libio/wfiledoalloc.c: New file. + * libio/wgenops.c: New file. + * libio/iofwide.c: New file. + * libio/Makefile.am: Tweaks. + * libio/Makefile.in: Regenerate. + * libio/gen-params: Remove. Generic replacement for this yet undone. + * libio/[filedoalloc.c, fileops.c, genops.c, iolibio.h, libio.h, + libioP.h, stdfiles.c]: Update. + * config/c_io_libio.cc: Tweaks. + * acinclude.m4: Complete hacks to test wide io. + * aclocal.m4: Regenerate. + * configure: Regenerate. + * src/Makefile.am: Update. + * src/Makefile.in: Regenerate. + + * math/cargl.c: Remove underscores. + + * bits/locale_facets.h: Tweaks. Start adding iconv details + and notes. + * bits/locale_facets.tcc: Tweaks. + * bits/std_cwchar.h: Tweaks. + 2000-06-29 scott snyder * bits/concept_checks.h @@ -18,7 +46,7 @@ function, uglify to __eos. Return char_type(). * bits/std_ostream.h: Change. - * testsuite/27_io/ostream_seeks.cc (test01): New file. + * testsuite/27_io/ostream_seeks.cc: New file. * testsuite/27_io/ostream_seeks-1.tst: New file. * testsuite/27_io/istream_unformatted.cc (main): Move test04 and test05 to... diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index 4203ea6910c5..f5582f278e4a 100644 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -1173,6 +1173,10 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [ # see if we are on a system with libio native (ie, linux) AC_CHECK_HEADER(libio.h, has_libio=yes, has_libio=no) + + # bkoz XXX hack hack need version checks, this is temporary + has_libio=no + if test $has_libio = "yes"; then BUILD_LIBIO_INCLUDE= need_libio=no @@ -1186,6 +1190,11 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [ # NB: This replaces the _G_CONFIG_H machinery in libio-v2 AC_CHECK_HEADER(_G_config.h, has_gconf_h=yes, has_gconf_h=no) AM_CONDITIONAL(GLIBCPP_NEED_LIBIO_CONFIG_H, test "$has_gconf_h" = no) + # bkoz XXX hack need to add support for non-glibc systems here + has_gconf=no + + # bkoz XXX need to add checks for this + need_wlibio=yes ;; xwince) CSTDIO_H=c_io_wince.h @@ -1204,6 +1213,7 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [ AC_SUBST(CSTDIO_H) AC_SUBST(CSTDIO_CC) AM_CONDITIONAL(GLIBCPP_NEED_LIBIO, test "$need_libio" = yes) + AM_CONDITIONAL(GLIBCPP_NEED_WLIBIO, test "$need_wlibio" = yes) ]) diff --git a/libstdc++-v3/aclocal.m4 b/libstdc++-v3/aclocal.m4 index a3d5bcb822a1..3f7a8b21e74c 100644 --- a/libstdc++-v3/aclocal.m4 +++ b/libstdc++-v3/aclocal.m4 @@ -1185,6 +1185,10 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [ # see if we are on a system with libio native (ie, linux) AC_CHECK_HEADER(libio.h, has_libio=yes, has_libio=no) + + # bkoz XXX hack hack need version checks, this is temporary + has_libio=no + if test $has_libio = "yes"; then BUILD_LIBIO_INCLUDE= need_libio=no @@ -1198,6 +1202,11 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [ # NB: This replaces the _G_CONFIG_H machinery in libio-v2 AC_CHECK_HEADER(_G_config.h, has_gconf_h=yes, has_gconf_h=no) AM_CONDITIONAL(GLIBCPP_NEED_LIBIO_CONFIG_H, test "$has_gconf_h" = no) + # bkoz XXX hack need to add support for non-glibc systems here + has_gconf=no + + # bkoz XXX need to add checks for this + need_wlibio=yes ;; xwince) CSTDIO_H=c_io_wince.h @@ -1216,6 +1225,7 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [ AC_SUBST(CSTDIO_H) AC_SUBST(CSTDIO_CC) AM_CONDITIONAL(GLIBCPP_NEED_LIBIO, test "$need_libio" = yes) + AM_CONDITIONAL(GLIBCPP_NEED_WLIBIO, test "$need_wlibio" = yes) ]) diff --git a/libstdc++-v3/bits/locale_facets.h b/libstdc++-v3/bits/locale_facets.h index f987f01665df..1c73ab9e2bb5 100644 --- a/libstdc++-v3/bits/locale_facets.h +++ b/libstdc++-v3/bits/locale_facets.h @@ -39,6 +39,10 @@ #include // For struct tm #include // For bad_cast, which shouldn't be here. #include // For ios_base +#ifdef _GLIBCPP_USE_WCHAR_T +// XXX should break this out?? +#include // For iconv, iconv_t +#endif namespace std { @@ -76,6 +80,60 @@ namespace std _Use_facet_failure_handler(const locale&) { throw _Bad_use_facet(); } + +#ifdef _GLIBCPP_USE_WCHAR_T + // Extensions to use icov for dealing with character encodings, + // including conversions and comparisons between various character + // sets. This object encapsulates data that codecvt and possibly + // ctype will use. + template + class __enc_traits + { + public: + // Types: + typedef iconv_t __conv_type; + typedef _IntT __intc_type; + typedef _ExtT __extc_type; + + // max size of charset encoding name + static const int __max_size = 32; + // name of internal character set encoding. + char __intc_enc[__max_size]; + // name of external character set encoding. + char __extc_enc[__max_size]; + + const char* + _M_get_intc_enc(void) + { return __intc_enc; } + + void + _M_set_intc_enc(const char* __c) + { strcpy(__intc_enc, __c); } + + const char* + _M_get_extc_enc(void) + { return __extc_enc; } + + void + _M_set_extc_enc(const char* __c) + { strcpy(__extc_enc, __c); } + + __enc_traits(const char* __int, const char* __ext) + { + // __intc_end = whatever we are using internally, which is + // almost alwyas UCS4 (linux) or UCS2 (microsoft, aix, + // whatever...) + // __extc_end = nl_langinfo(CODESET) + strcpy(__intc_enc, __int); + strcpy(__extc_enc, __ext); + } + + protected: + __enc_traits(); + __enc_traits(const __enc_traits&); + }; +#endif //_GLIBCPP_USE_WCHAR_T + // 22.2.1 The ctype category // Include host-specific ctype enums for ctype_base. #include @@ -86,10 +144,10 @@ namespace std template class _Ctype_nois : public locale::facet, public ctype_base { + public: // Types: typedef _CharT char_type; - public: char_type toupper(char_type __c) const { return this->do_toupper(__c); } @@ -162,7 +220,6 @@ namespace std class _Ctype : public _Ctype_nois<_CharT> { public: - // Types: typedef _CharT char_type; typedef typename _Ctype_nois<_CharT>::mask mask; @@ -644,8 +701,8 @@ namespace std #ifdef _GLIBCPP_USE_WCHAR_T template<> - class codecvt - : public _Codecvt + class codecvt + : public _Codecvt { public: // Types: @@ -687,7 +744,7 @@ namespace std // 22.2.1.6 Template class codecvt_byname template - class codecvt_byname : public codecvt<_InternT,_ExternT,_StateT> + class codecvt_byname : public codecvt<_InternT, _ExternT, _StateT> { public: explicit @@ -699,8 +756,8 @@ namespace std }; template<> - class codecvt_byname - : public codecvt + class codecvt_byname + : public codecvt { public: explicit @@ -713,8 +770,8 @@ namespace std #ifdef _GLIBCPP_USE_WCHAR_T template<> - class codecvt_byname - : public codecvt + class codecvt_byname + : public codecvt { public: explicit diff --git a/libstdc++-v3/bits/locale_facets.tcc b/libstdc++-v3/bits/locale_facets.tcc index dce6e25af9ca..a91d57f6d7ea 100644 --- a/libstdc++-v3/bits/locale_facets.tcc +++ b/libstdc++-v3/bits/locale_facets.tcc @@ -606,7 +606,7 @@ namespace std // Stage 1: extract and determine the conversion specifier. // Assuming leading zeros eliminated, thus the size of 32 for // integral types. - char __xtrc[32]= {'\0'}; + char __xtrc[32] = {'\0'}; int __base; _M_extract(__beg, __end, __io, __err, __xtrc, __base, false); diff --git a/libstdc++-v3/bits/std_cwchar.h b/libstdc++-v3/bits/std_cwchar.h index a78e95e279d0..43470aed5d74 100644 --- a/libstdc++-v3/bits/std_cwchar.h +++ b/libstdc++-v3/bits/std_cwchar.h @@ -42,15 +42,17 @@ # pragma system_header # include_next #else -# ifdef _GLIBCPP_NEED_MBSTATE_T +# ifdef __cplusplus extern "C" { +#endif typedef struct { int __fill[6]; } mbstate_t; +# ifdef __cplusplus } -# endif +# endif #endif //_GLIBCPP_USE_WCHAR_T #endif // _CPP_CWCHAR diff --git a/libstdc++-v3/config/c_io_libio.cc b/libstdc++-v3/config/c_io_libio.cc index 7bc4a990bf9e..69a820009cef 100644 --- a/libstdc++-v3/config/c_io_libio.cc +++ b/libstdc++-v3/config/c_io_libio.cc @@ -41,7 +41,7 @@ namespace std { { _lock = __lock; _IO_init(this, 0); - _IO_file_init(this); + _IO_file_init((_IO_FILE_plus*) this); _IO_file_attach(this, -1); } @@ -55,7 +55,7 @@ namespace std { { _IO_do_flush(this); if (!(_flags & _IO_DELETE_DONT_CLOSE)) - _IO_SYSCLOSE(this); + _IO_SYSCLOSE((_IO_FILE*)this); } _IO_default_finish(this, 0); } @@ -92,7 +92,7 @@ namespace std { _fileno = __fd; int __mask = _IO_NO_READS + _IO_NO_WRITES + _IO_IS_APPENDING; _flags = (_flags & ~__mask) | (__rw_mode & __mask); - _IO_link_in(this); + _IO_link_in((_IO_FILE_plus*) this); __retval = this; } return __retval; diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index cd0ef68918d1..f237730b18fa 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -2221,6 +2221,10 @@ else has_libio=no fi + + # bkoz XXX hack hack need version checks, this is temporary + has_libio=no + if test $has_libio = "yes"; then BUILD_LIBIO_INCLUDE= need_libio=no @@ -2234,17 +2238,17 @@ fi # NB: This replaces the _G_CONFIG_H machinery in libio-v2 ac_safe=`echo "_G_config.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for _G_config.h""... $ac_c" 1>&6 -echo "configure:2238: checking for _G_config.h" >&5 +echo "configure:2242: checking for _G_config.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2248: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2275,6 +2279,11 @@ else GLIBCPP_NEED_LIBIO_CONFIG_H_TRUE='#' GLIBCPP_NEED_LIBIO_CONFIG_H_FALSE= fi + # bkoz XXX hack need to add support for non-glibc systems here + has_gconf=no + + # bkoz XXX need to add checks for this + need_wlibio=yes ;; xwince) CSTDIO_H=c_io_wince.h @@ -2301,6 +2310,15 @@ else GLIBCPP_NEED_LIBIO_TRUE='#' GLIBCPP_NEED_LIBIO_FALSE= fi + + +if test "$need_wlibio" = yes; then + GLIBCPP_NEED_WLIBIO_TRUE= + GLIBCPP_NEED_WLIBIO_FALSE='#' +else + GLIBCPP_NEED_WLIBIO_TRUE='#' + GLIBCPP_NEED_WLIBIO_FALSE= +fi # Check whether --enable-long-long or --disable-long-long was given. @@ -2317,12 +2335,12 @@ fi # Check for the existance of functions used if long long is enabled. echo $ac_n "checking for strtoll""... $ac_c" 1>&6 -echo "configure:2321: checking for strtoll" >&5 +echo "configure:2339: checking for strtoll" >&5 if eval "test \"`echo '$''{'ac_cv_func_strtoll'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_strtoll=yes" else @@ -2366,12 +2384,12 @@ ac_strtoll=no fi echo $ac_n "checking for strtoull""... $ac_c" 1>&6 -echo "configure:2370: checking for strtoull" >&5 +echo "configure:2388: checking for strtoull" >&5 if eval "test \"`echo '$''{'ac_cv_func_strtoull'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_strtoull=yes" else @@ -2416,7 +2434,7 @@ fi echo $ac_n "checking for enabled long long""... $ac_c" 1>&6 -echo "configure:2420: checking for enabled long long" >&5 +echo "configure:2438: checking for enabled long long" >&5 if test x"$ac_strtoll" = xno || test x"$ac_strtoull" = xno; then enable_long_long=no; fi; @@ -2431,7 +2449,7 @@ EOF esac echo $ac_n "checking for enabled cshadow headers""... $ac_c" 1>&6 -echo "configure:2435: checking for enabled cshadow headers" >&5 +echo "configure:2453: checking for enabled cshadow headers" >&5 # Check whether --enable-cshadow-headers or --disable-cshadow-headers was given. if test "${enable_cshadow_headers+set}" = set; then enableval="$enable_cshadow_headers" @@ -2472,7 +2490,7 @@ fi echo $ac_n "checking for threads package to use""... $ac_c" 1>&6 -echo "configure:2476: checking for threads package to use" >&5 +echo "configure:2494: checking for threads package to use" >&5 # Check whether --enable-threads or --disable-threads was given. if test "${enable_threads+set}" = set; then enableval="$enable_threads" @@ -2535,17 +2553,17 @@ fi posix) ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for pthread.h""... $ac_c" 1>&6 -echo "configure:2539: checking for pthread.h" >&5 +echo "configure:2557: checking for pthread.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2549: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2734,17 +2752,17 @@ else do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2738: checking for $ac_hdr" >&5 +echo "configure:2756: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2766: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2789,10 +2807,10 @@ cross_compiling=$ac_cv_prog_cxx_cross # Check for pragma system_header. echo $ac_n "checking for g++ that supports pragma system_header""... $ac_c" 1>&6 -echo "configure:2793: checking for g++ that supports pragma system_header" >&5 +echo "configure:2811: checking for g++ that supports pragma system_header" >&5 CXXFLAGS='-Wunknown-pragmas -Werror' cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2822: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_newpragma=yes else @@ -2823,10 +2841,10 @@ rm -f conftest* # Check for more sophisticated diagnostic control. echo $ac_n "checking for g++ that supports -fdiagnostics-show-location=once""... $ac_c" 1>&6 -echo "configure:2827: checking for g++ that supports -fdiagnostics-show-location=once" >&5 +echo "configure:2845: checking for g++ that supports -fdiagnostics-show-location=once" >&5 CXXFLAGS='-fdiagnostics-show-location=once' cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_gabydiags=yes else @@ -2857,10 +2875,10 @@ rm -f conftest* # Check for -ffunction-sections -fdata-sections echo $ac_n "checking for g++ that supports -ffunction-sections -fdata-sections""... $ac_c" 1>&6 -echo "configure:2861: checking for g++ that supports -ffunction-sections -fdata-sections" >&5 +echo "configure:2879: checking for g++ that supports -ffunction-sections -fdata-sections" >&5 CXXFLAGS='-ffunction-sections -fdata-sections' cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2890: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_fdsections=yes else @@ -2909,12 +2927,12 @@ cross_compiling=$ac_cv_prog_cc_cross # Check for -Wl,--gc-sections echo $ac_n "checking for ld that supports -Wl,--gc-sections""... $ac_c" 1>&6 -echo "configure:2913: checking for ld that supports -Wl,--gc-sections" >&5 +echo "configure:2931: checking for ld that supports -Wl,--gc-sections" >&5 if test "$cross_compiling" = yes; then ac_sectionLDflags=yes else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_sectionLDflags=yes else @@ -2961,16 +2979,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for __builtin_abs declaration""... $ac_c" 1>&6 -echo "configure:2965: checking for __builtin_abs declaration" >&5 +echo "configure:2983: checking for __builtin_abs declaration" >&5 cat > conftest.$ac_ext < int main() { __builtin_abs(0); ; return 0; } EOF -if { (eval echo configure:2974: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use___builtin_abs=yes else @@ -2990,16 +3008,16 @@ cross_compiling=$ac_cv_prog_cc_cross if test x$use___builtin_abs = x"yes"; then echo $ac_n "checking for __builtin_abs linkage""... $ac_c" 1>&6 -echo "configure:2994: checking for __builtin_abs linkage" >&5 +echo "configure:3012: checking for __builtin_abs linkage" >&5 cat > conftest.$ac_ext < int main() { __builtin_abs(0); ; return 0; } EOF -if { (eval echo configure:3003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* link___builtin_abs=yes else @@ -3029,16 +3047,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for __builtin_fabsf declaration""... $ac_c" 1>&6 -echo "configure:3033: checking for __builtin_fabsf declaration" >&5 +echo "configure:3051: checking for __builtin_fabsf declaration" >&5 cat > conftest.$ac_ext < int main() { __builtin_fabsf(0); ; return 0; } EOF -if { (eval echo configure:3042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3060: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use___builtin_fabsf=yes else @@ -3058,16 +3076,16 @@ cross_compiling=$ac_cv_prog_cc_cross if test x$use___builtin_fabsf = x"yes"; then echo $ac_n "checking for __builtin_fabsf linkage""... $ac_c" 1>&6 -echo "configure:3062: checking for __builtin_fabsf linkage" >&5 +echo "configure:3080: checking for __builtin_fabsf linkage" >&5 cat > conftest.$ac_ext < int main() { __builtin_fabsf(0); ; return 0; } EOF -if { (eval echo configure:3071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* link___builtin_fabsf=yes else @@ -3097,16 +3115,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for __builtin_fabs declaration""... $ac_c" 1>&6 -echo "configure:3101: checking for __builtin_fabs declaration" >&5 +echo "configure:3119: checking for __builtin_fabs declaration" >&5 cat > conftest.$ac_ext < int main() { __builtin_fabs(0); ; return 0; } EOF -if { (eval echo configure:3110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use___builtin_fabs=yes else @@ -3126,16 +3144,16 @@ cross_compiling=$ac_cv_prog_cc_cross if test x$use___builtin_fabs = x"yes"; then echo $ac_n "checking for __builtin_fabs linkage""... $ac_c" 1>&6 -echo "configure:3130: checking for __builtin_fabs linkage" >&5 +echo "configure:3148: checking for __builtin_fabs linkage" >&5 cat > conftest.$ac_ext < int main() { __builtin_fabs(0); ; return 0; } EOF -if { (eval echo configure:3139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* link___builtin_fabs=yes else @@ -3165,16 +3183,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for __builtin_fabsl declaration""... $ac_c" 1>&6 -echo "configure:3169: checking for __builtin_fabsl declaration" >&5 +echo "configure:3187: checking for __builtin_fabsl declaration" >&5 cat > conftest.$ac_ext < int main() { __builtin_fabsl(0); ; return 0; } EOF -if { (eval echo configure:3178: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3196: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use___builtin_fabsl=yes else @@ -3194,16 +3212,16 @@ cross_compiling=$ac_cv_prog_cc_cross if test x$use___builtin_fabsl = x"yes"; then echo $ac_n "checking for __builtin_fabsl linkage""... $ac_c" 1>&6 -echo "configure:3198: checking for __builtin_fabsl linkage" >&5 +echo "configure:3216: checking for __builtin_fabsl linkage" >&5 cat > conftest.$ac_ext < int main() { __builtin_fabsl(0); ; return 0; } EOF -if { (eval echo configure:3207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* link___builtin_fabsl=yes else @@ -3233,16 +3251,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for __builtin_labs declaration""... $ac_c" 1>&6 -echo "configure:3237: checking for __builtin_labs declaration" >&5 +echo "configure:3255: checking for __builtin_labs declaration" >&5 cat > conftest.$ac_ext < int main() { __builtin_labs(0); ; return 0; } EOF -if { (eval echo configure:3246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use___builtin_labs=yes else @@ -3262,16 +3280,16 @@ cross_compiling=$ac_cv_prog_cc_cross if test x$use___builtin_labs = x"yes"; then echo $ac_n "checking for __builtin_labs linkage""... $ac_c" 1>&6 -echo "configure:3266: checking for __builtin_labs linkage" >&5 +echo "configure:3284: checking for __builtin_labs linkage" >&5 cat > conftest.$ac_ext < int main() { __builtin_labs(0); ; return 0; } EOF -if { (eval echo configure:3275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* link___builtin_labs=yes else @@ -3302,16 +3320,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for __builtin_sqrtf declaration""... $ac_c" 1>&6 -echo "configure:3306: checking for __builtin_sqrtf declaration" >&5 +echo "configure:3324: checking for __builtin_sqrtf declaration" >&5 cat > conftest.$ac_ext < int main() { __builtin_sqrtf(0); ; return 0; } EOF -if { (eval echo configure:3315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use___builtin_sqrtf=yes else @@ -3331,16 +3349,16 @@ cross_compiling=$ac_cv_prog_cc_cross if test x$use___builtin_sqrtf = x"yes"; then echo $ac_n "checking for __builtin_sqrtf linkage""... $ac_c" 1>&6 -echo "configure:3335: checking for __builtin_sqrtf linkage" >&5 +echo "configure:3353: checking for __builtin_sqrtf linkage" >&5 cat > conftest.$ac_ext < int main() { __builtin_sqrtf(0); ; return 0; } EOF -if { (eval echo configure:3344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* link___builtin_sqrtf=yes else @@ -3370,16 +3388,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for __builtin_fsqrt declaration""... $ac_c" 1>&6 -echo "configure:3374: checking for __builtin_fsqrt declaration" >&5 +echo "configure:3392: checking for __builtin_fsqrt declaration" >&5 cat > conftest.$ac_ext < int main() { __builtin_fsqrt(0); ; return 0; } EOF -if { (eval echo configure:3383: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use___builtin_fsqrt=yes else @@ -3399,16 +3417,16 @@ cross_compiling=$ac_cv_prog_cc_cross if test x$use___builtin_fsqrt = x"yes"; then echo $ac_n "checking for __builtin_fsqrt linkage""... $ac_c" 1>&6 -echo "configure:3403: checking for __builtin_fsqrt linkage" >&5 +echo "configure:3421: checking for __builtin_fsqrt linkage" >&5 cat > conftest.$ac_ext < int main() { __builtin_fsqrt(0); ; return 0; } EOF -if { (eval echo configure:3412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* link___builtin_fsqrt=yes else @@ -3438,16 +3456,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for __builtin_sqrtl declaration""... $ac_c" 1>&6 -echo "configure:3442: checking for __builtin_sqrtl declaration" >&5 +echo "configure:3460: checking for __builtin_sqrtl declaration" >&5 cat > conftest.$ac_ext < int main() { __builtin_sqrtl(0); ; return 0; } EOF -if { (eval echo configure:3451: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use___builtin_sqrtl=yes else @@ -3467,16 +3485,16 @@ cross_compiling=$ac_cv_prog_cc_cross if test x$use___builtin_sqrtl = x"yes"; then echo $ac_n "checking for __builtin_sqrtl linkage""... $ac_c" 1>&6 -echo "configure:3471: checking for __builtin_sqrtl linkage" >&5 +echo "configure:3489: checking for __builtin_sqrtl linkage" >&5 cat > conftest.$ac_ext < int main() { __builtin_sqrtl(0); ; return 0; } EOF -if { (eval echo configure:3480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* link___builtin_sqrtl=yes else @@ -3507,16 +3525,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for __builtin_sinf declaration""... $ac_c" 1>&6 -echo "configure:3511: checking for __builtin_sinf declaration" >&5 +echo "configure:3529: checking for __builtin_sinf declaration" >&5 cat > conftest.$ac_ext < int main() { __builtin_sinf(0); ; return 0; } EOF -if { (eval echo configure:3520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3538: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use___builtin_sinf=yes else @@ -3536,16 +3554,16 @@ cross_compiling=$ac_cv_prog_cc_cross if test x$use___builtin_sinf = x"yes"; then echo $ac_n "checking for __builtin_sinf linkage""... $ac_c" 1>&6 -echo "configure:3540: checking for __builtin_sinf linkage" >&5 +echo "configure:3558: checking for __builtin_sinf linkage" >&5 cat > conftest.$ac_ext < int main() { __builtin_sinf(0); ; return 0; } EOF -if { (eval echo configure:3549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* link___builtin_sinf=yes else @@ -3575,16 +3593,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for __builtin_sin declaration""... $ac_c" 1>&6 -echo "configure:3579: checking for __builtin_sin declaration" >&5 +echo "configure:3597: checking for __builtin_sin declaration" >&5 cat > conftest.$ac_ext < int main() { __builtin_sin(0); ; return 0; } EOF -if { (eval echo configure:3588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3606: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use___builtin_sin=yes else @@ -3604,16 +3622,16 @@ cross_compiling=$ac_cv_prog_cc_cross if test x$use___builtin_sin = x"yes"; then echo $ac_n "checking for __builtin_sin linkage""... $ac_c" 1>&6 -echo "configure:3608: checking for __builtin_sin linkage" >&5 +echo "configure:3626: checking for __builtin_sin linkage" >&5 cat > conftest.$ac_ext < int main() { __builtin_sin(0); ; return 0; } EOF -if { (eval echo configure:3617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* link___builtin_sin=yes else @@ -3643,16 +3661,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for __builtin_sinl declaration""... $ac_c" 1>&6 -echo "configure:3647: checking for __builtin_sinl declaration" >&5 +echo "configure:3665: checking for __builtin_sinl declaration" >&5 cat > conftest.$ac_ext < int main() { __builtin_sinl(0); ; return 0; } EOF -if { (eval echo configure:3656: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use___builtin_sinl=yes else @@ -3672,16 +3690,16 @@ cross_compiling=$ac_cv_prog_cc_cross if test x$use___builtin_sinl = x"yes"; then echo $ac_n "checking for __builtin_sinl linkage""... $ac_c" 1>&6 -echo "configure:3676: checking for __builtin_sinl linkage" >&5 +echo "configure:3694: checking for __builtin_sinl linkage" >&5 cat > conftest.$ac_ext < int main() { __builtin_sinl(0); ; return 0; } EOF -if { (eval echo configure:3685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* link___builtin_sinl=yes else @@ -3712,16 +3730,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for __builtin_cosf declaration""... $ac_c" 1>&6 -echo "configure:3716: checking for __builtin_cosf declaration" >&5 +echo "configure:3734: checking for __builtin_cosf declaration" >&5 cat > conftest.$ac_ext < int main() { __builtin_cosf(0); ; return 0; } EOF -if { (eval echo configure:3725: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use___builtin_cosf=yes else @@ -3741,16 +3759,16 @@ cross_compiling=$ac_cv_prog_cc_cross if test x$use___builtin_cosf = x"yes"; then echo $ac_n "checking for __builtin_cosf linkage""... $ac_c" 1>&6 -echo "configure:3745: checking for __builtin_cosf linkage" >&5 +echo "configure:3763: checking for __builtin_cosf linkage" >&5 cat > conftest.$ac_ext < int main() { __builtin_cosf(0); ; return 0; } EOF -if { (eval echo configure:3754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* link___builtin_cosf=yes else @@ -3780,16 +3798,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for __builtin_cos declaration""... $ac_c" 1>&6 -echo "configure:3784: checking for __builtin_cos declaration" >&5 +echo "configure:3802: checking for __builtin_cos declaration" >&5 cat > conftest.$ac_ext < int main() { __builtin_cos(0); ; return 0; } EOF -if { (eval echo configure:3793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3811: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use___builtin_cos=yes else @@ -3809,16 +3827,16 @@ cross_compiling=$ac_cv_prog_cc_cross if test x$use___builtin_cos = x"yes"; then echo $ac_n "checking for __builtin_cos linkage""... $ac_c" 1>&6 -echo "configure:3813: checking for __builtin_cos linkage" >&5 +echo "configure:3831: checking for __builtin_cos linkage" >&5 cat > conftest.$ac_ext < int main() { __builtin_cos(0); ; return 0; } EOF -if { (eval echo configure:3822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* link___builtin_cos=yes else @@ -3848,16 +3866,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for __builtin_cosl declaration""... $ac_c" 1>&6 -echo "configure:3852: checking for __builtin_cosl declaration" >&5 +echo "configure:3870: checking for __builtin_cosl declaration" >&5 cat > conftest.$ac_ext < int main() { __builtin_cosl(0); ; return 0; } EOF -if { (eval echo configure:3861: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use___builtin_cosl=yes else @@ -3877,16 +3895,16 @@ cross_compiling=$ac_cv_prog_cc_cross if test x$use___builtin_cosl = x"yes"; then echo $ac_n "checking for __builtin_cosl linkage""... $ac_c" 1>&6 -echo "configure:3881: checking for __builtin_cosl linkage" >&5 +echo "configure:3899: checking for __builtin_cosl linkage" >&5 cat > conftest.$ac_ext < int main() { __builtin_cosl(0); ; return 0; } EOF -if { (eval echo configure:3890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* link___builtin_cosl=yes else @@ -3973,7 +3991,7 @@ EOF CXXFLAGS='-fno-builtins -D_GNU_SOURCE' echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6 -echo "configure:3977: checking for sin in -lm" >&5 +echo "configure:3995: checking for sin in -lm" >&5 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3981,7 +3999,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4018,12 +4036,12 @@ fi for ac_func in strtof strtold do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4022: checking for $ac_func" >&5 +echo "configure:4040: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4081,16 +4099,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for isinf declaration""... $ac_c" 1>&6 -echo "configure:4085: checking for isinf declaration" >&5 +echo "configure:4103: checking for isinf declaration" >&5 cat > conftest.$ac_ext < int main() { isinf(0); ; return 0; } EOF -if { (eval echo configure:4094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4112: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_isinf=yes else @@ -4112,12 +4130,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in isinf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4116: checking for $ac_func" >&5 +echo "configure:4134: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4176,16 +4194,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for isnan declaration""... $ac_c" 1>&6 -echo "configure:4180: checking for isnan declaration" >&5 +echo "configure:4198: checking for isnan declaration" >&5 cat > conftest.$ac_ext < int main() { isnan(0); ; return 0; } EOF -if { (eval echo configure:4189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4207: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_isnan=yes else @@ -4207,12 +4225,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in isnan do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4211: checking for $ac_func" >&5 +echo "configure:4229: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4271,16 +4289,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for finite declaration""... $ac_c" 1>&6 -echo "configure:4275: checking for finite declaration" >&5 +echo "configure:4293: checking for finite declaration" >&5 cat > conftest.$ac_ext < int main() { finite(0); ; return 0; } EOF -if { (eval echo configure:4284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4302: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_finite=yes else @@ -4302,12 +4320,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in finite do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4306: checking for $ac_func" >&5 +echo "configure:4324: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4366,16 +4384,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for copysign declaration""... $ac_c" 1>&6 -echo "configure:4370: checking for copysign declaration" >&5 +echo "configure:4388: checking for copysign declaration" >&5 cat > conftest.$ac_ext < int main() { copysign(0, 0); ; return 0; } EOF -if { (eval echo configure:4379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_copysign=yes else @@ -4397,12 +4415,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in copysign do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4401: checking for $ac_func" >&5 +echo "configure:4419: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4461,16 +4479,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for sincos declaration""... $ac_c" 1>&6 -echo "configure:4465: checking for sincos declaration" >&5 +echo "configure:4483: checking for sincos declaration" >&5 cat > conftest.$ac_ext < int main() { sincos(0, 0, 0); ; return 0; } EOF -if { (eval echo configure:4474: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4492: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_sincos=yes else @@ -4492,12 +4510,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in sincos do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4496: checking for $ac_func" >&5 +echo "configure:4514: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4556,16 +4574,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for fpclass declaration""... $ac_c" 1>&6 -echo "configure:4560: checking for fpclass declaration" >&5 +echo "configure:4578: checking for fpclass declaration" >&5 cat > conftest.$ac_ext < int main() { fpclass(0); ; return 0; } EOF -if { (eval echo configure:4569: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4587: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_fpclass=yes else @@ -4587,12 +4605,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in fpclass do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4591: checking for $ac_func" >&5 +echo "configure:4609: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4651,16 +4669,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for qfpclass declaration""... $ac_c" 1>&6 -echo "configure:4655: checking for qfpclass declaration" >&5 +echo "configure:4673: checking for qfpclass declaration" >&5 cat > conftest.$ac_ext < int main() { qfpclass(0); ; return 0; } EOF -if { (eval echo configure:4664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4682: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_qfpclass=yes else @@ -4682,12 +4700,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in qfpclass do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4686: checking for $ac_func" >&5 +echo "configure:4704: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4747,16 +4765,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for isnanf declaration""... $ac_c" 1>&6 -echo "configure:4751: checking for isnanf declaration" >&5 +echo "configure:4769: checking for isnanf declaration" >&5 cat > conftest.$ac_ext < int main() { isnanf(0); ; return 0; } EOF -if { (eval echo configure:4760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_isnanf=yes else @@ -4778,12 +4796,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in isnanf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4782: checking for $ac_func" >&5 +echo "configure:4800: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4842,16 +4860,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for isinff declaration""... $ac_c" 1>&6 -echo "configure:4846: checking for isinff declaration" >&5 +echo "configure:4864: checking for isinff declaration" >&5 cat > conftest.$ac_ext < int main() { isinff(0); ; return 0; } EOF -if { (eval echo configure:4855: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_isinff=yes else @@ -4873,12 +4891,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in isinff do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4877: checking for $ac_func" >&5 +echo "configure:4895: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4937,16 +4955,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for acosf declaration""... $ac_c" 1>&6 -echo "configure:4941: checking for acosf declaration" >&5 +echo "configure:4959: checking for acosf declaration" >&5 cat > conftest.$ac_ext < int main() { acosf(0); ; return 0; } EOF -if { (eval echo configure:4950: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4968: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_acosf=yes else @@ -4968,12 +4986,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in acosf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4972: checking for $ac_func" >&5 +echo "configure:4990: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5032,16 +5050,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for asinf declaration""... $ac_c" 1>&6 -echo "configure:5036: checking for asinf declaration" >&5 +echo "configure:5054: checking for asinf declaration" >&5 cat > conftest.$ac_ext < int main() { asinf(0); ; return 0; } EOF -if { (eval echo configure:5045: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5063: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_asinf=yes else @@ -5063,12 +5081,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in asinf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5067: checking for $ac_func" >&5 +echo "configure:5085: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5127,16 +5145,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for atanf declaration""... $ac_c" 1>&6 -echo "configure:5131: checking for atanf declaration" >&5 +echo "configure:5149: checking for atanf declaration" >&5 cat > conftest.$ac_ext < int main() { atanf(0); ; return 0; } EOF -if { (eval echo configure:5140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_atanf=yes else @@ -5158,12 +5176,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in atanf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5162: checking for $ac_func" >&5 +echo "configure:5180: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5222,16 +5240,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for atan2f declaration""... $ac_c" 1>&6 -echo "configure:5226: checking for atan2f declaration" >&5 +echo "configure:5244: checking for atan2f declaration" >&5 cat > conftest.$ac_ext < int main() { atan2f(0, 0); ; return 0; } EOF -if { (eval echo configure:5235: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_atan2f=yes else @@ -5253,12 +5271,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in atan2f do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5257: checking for $ac_func" >&5 +echo "configure:5275: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5317,16 +5335,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for ceilf declaration""... $ac_c" 1>&6 -echo "configure:5321: checking for ceilf declaration" >&5 +echo "configure:5339: checking for ceilf declaration" >&5 cat > conftest.$ac_ext < int main() { ceilf(0); ; return 0; } EOF -if { (eval echo configure:5330: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_ceilf=yes else @@ -5348,12 +5366,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in ceilf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5352: checking for $ac_func" >&5 +echo "configure:5370: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5412,16 +5430,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for cosf declaration""... $ac_c" 1>&6 -echo "configure:5416: checking for cosf declaration" >&5 +echo "configure:5434: checking for cosf declaration" >&5 cat > conftest.$ac_ext < int main() { cosf(0); ; return 0; } EOF -if { (eval echo configure:5425: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5443: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_cosf=yes else @@ -5443,12 +5461,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in cosf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5447: checking for $ac_func" >&5 +echo "configure:5465: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5507,16 +5525,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for coshf declaration""... $ac_c" 1>&6 -echo "configure:5511: checking for coshf declaration" >&5 +echo "configure:5529: checking for coshf declaration" >&5 cat > conftest.$ac_ext < int main() { coshf(0); ; return 0; } EOF -if { (eval echo configure:5520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5538: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_coshf=yes else @@ -5538,12 +5556,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in coshf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5542: checking for $ac_func" >&5 +echo "configure:5560: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5602,16 +5620,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for expf declaration""... $ac_c" 1>&6 -echo "configure:5606: checking for expf declaration" >&5 +echo "configure:5624: checking for expf declaration" >&5 cat > conftest.$ac_ext < int main() { expf(0); ; return 0; } EOF -if { (eval echo configure:5615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5633: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_expf=yes else @@ -5633,12 +5651,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in expf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5637: checking for $ac_func" >&5 +echo "configure:5655: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5697,16 +5715,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for fabsf declaration""... $ac_c" 1>&6 -echo "configure:5701: checking for fabsf declaration" >&5 +echo "configure:5719: checking for fabsf declaration" >&5 cat > conftest.$ac_ext < int main() { fabsf(0); ; return 0; } EOF -if { (eval echo configure:5710: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5728: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_fabsf=yes else @@ -5728,12 +5746,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in fabsf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5732: checking for $ac_func" >&5 +echo "configure:5750: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5792,16 +5810,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for floorf declaration""... $ac_c" 1>&6 -echo "configure:5796: checking for floorf declaration" >&5 +echo "configure:5814: checking for floorf declaration" >&5 cat > conftest.$ac_ext < int main() { floorf(0); ; return 0; } EOF -if { (eval echo configure:5805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5823: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_floorf=yes else @@ -5823,12 +5841,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in floorf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5827: checking for $ac_func" >&5 +echo "configure:5845: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5887,16 +5905,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for fmodf declaration""... $ac_c" 1>&6 -echo "configure:5891: checking for fmodf declaration" >&5 +echo "configure:5909: checking for fmodf declaration" >&5 cat > conftest.$ac_ext < int main() { fmodf(0, 0); ; return 0; } EOF -if { (eval echo configure:5900: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5918: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_fmodf=yes else @@ -5918,12 +5936,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in fmodf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5922: checking for $ac_func" >&5 +echo "configure:5940: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5982,16 +6000,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for frexpf declaration""... $ac_c" 1>&6 -echo "configure:5986: checking for frexpf declaration" >&5 +echo "configure:6004: checking for frexpf declaration" >&5 cat > conftest.$ac_ext < int main() { frexpf(0, 0); ; return 0; } EOF -if { (eval echo configure:5995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_frexpf=yes else @@ -6013,12 +6031,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in frexpf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6017: checking for $ac_func" >&5 +echo "configure:6035: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6077,16 +6095,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for ldexpf declaration""... $ac_c" 1>&6 -echo "configure:6081: checking for ldexpf declaration" >&5 +echo "configure:6099: checking for ldexpf declaration" >&5 cat > conftest.$ac_ext < int main() { ldexpf(0, 0); ; return 0; } EOF -if { (eval echo configure:6090: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6108: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_ldexpf=yes else @@ -6108,12 +6126,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in ldexpf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6112: checking for $ac_func" >&5 +echo "configure:6130: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6172,16 +6190,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for logf declaration""... $ac_c" 1>&6 -echo "configure:6176: checking for logf declaration" >&5 +echo "configure:6194: checking for logf declaration" >&5 cat > conftest.$ac_ext < int main() { logf(0); ; return 0; } EOF -if { (eval echo configure:6185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_logf=yes else @@ -6203,12 +6221,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in logf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6207: checking for $ac_func" >&5 +echo "configure:6225: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6267,16 +6285,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for log10f declaration""... $ac_c" 1>&6 -echo "configure:6271: checking for log10f declaration" >&5 +echo "configure:6289: checking for log10f declaration" >&5 cat > conftest.$ac_ext < int main() { log10f(0); ; return 0; } EOF -if { (eval echo configure:6280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6298: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_log10f=yes else @@ -6298,12 +6316,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in log10f do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6302: checking for $ac_func" >&5 +echo "configure:6320: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6362,16 +6380,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for modff declaration""... $ac_c" 1>&6 -echo "configure:6366: checking for modff declaration" >&5 +echo "configure:6384: checking for modff declaration" >&5 cat > conftest.$ac_ext < int main() { modff(0, 0); ; return 0; } EOF -if { (eval echo configure:6375: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_modff=yes else @@ -6393,12 +6411,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in modff do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6397: checking for $ac_func" >&5 +echo "configure:6415: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6457,16 +6475,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for powf declaration""... $ac_c" 1>&6 -echo "configure:6461: checking for powf declaration" >&5 +echo "configure:6479: checking for powf declaration" >&5 cat > conftest.$ac_ext < int main() { powf(0, 0); ; return 0; } EOF -if { (eval echo configure:6470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_powf=yes else @@ -6488,12 +6506,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in powf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6492: checking for $ac_func" >&5 +echo "configure:6510: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6552,16 +6570,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for sinf declaration""... $ac_c" 1>&6 -echo "configure:6556: checking for sinf declaration" >&5 +echo "configure:6574: checking for sinf declaration" >&5 cat > conftest.$ac_ext < int main() { sinf(0); ; return 0; } EOF -if { (eval echo configure:6565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6583: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_sinf=yes else @@ -6583,12 +6601,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in sinf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6587: checking for $ac_func" >&5 +echo "configure:6605: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6647,16 +6665,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for sinhf declaration""... $ac_c" 1>&6 -echo "configure:6651: checking for sinhf declaration" >&5 +echo "configure:6669: checking for sinhf declaration" >&5 cat > conftest.$ac_ext < int main() { sinhf(0); ; return 0; } EOF -if { (eval echo configure:6660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_sinhf=yes else @@ -6678,12 +6696,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in sinhf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6682: checking for $ac_func" >&5 +echo "configure:6700: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6742,16 +6760,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for sqrtf declaration""... $ac_c" 1>&6 -echo "configure:6746: checking for sqrtf declaration" >&5 +echo "configure:6764: checking for sqrtf declaration" >&5 cat > conftest.$ac_ext < int main() { sqrtf(0); ; return 0; } EOF -if { (eval echo configure:6755: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6773: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_sqrtf=yes else @@ -6773,12 +6791,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in sqrtf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6777: checking for $ac_func" >&5 +echo "configure:6795: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6837,16 +6855,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for tanf declaration""... $ac_c" 1>&6 -echo "configure:6841: checking for tanf declaration" >&5 +echo "configure:6859: checking for tanf declaration" >&5 cat > conftest.$ac_ext < int main() { tanf(0); ; return 0; } EOF -if { (eval echo configure:6850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_tanf=yes else @@ -6868,12 +6886,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in tanf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6872: checking for $ac_func" >&5 +echo "configure:6890: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6932,16 +6950,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for tanhf declaration""... $ac_c" 1>&6 -echo "configure:6936: checking for tanhf declaration" >&5 +echo "configure:6954: checking for tanhf declaration" >&5 cat > conftest.$ac_ext < int main() { tanhf(0); ; return 0; } EOF -if { (eval echo configure:6945: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6963: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_tanhf=yes else @@ -6963,12 +6981,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in tanhf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6967: checking for $ac_func" >&5 +echo "configure:6985: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7027,16 +7045,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for sincosf declaration""... $ac_c" 1>&6 -echo "configure:7031: checking for sincosf declaration" >&5 +echo "configure:7049: checking for sincosf declaration" >&5 cat > conftest.$ac_ext < int main() { sincosf(0, 0, 0); ; return 0; } EOF -if { (eval echo configure:7040: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_sincosf=yes else @@ -7058,12 +7076,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in sincosf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7062: checking for $ac_func" >&5 +echo "configure:7080: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7122,16 +7140,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for finitef declaration""... $ac_c" 1>&6 -echo "configure:7126: checking for finitef declaration" >&5 +echo "configure:7144: checking for finitef declaration" >&5 cat > conftest.$ac_ext < int main() { finitef(0); ; return 0; } EOF -if { (eval echo configure:7135: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_finitef=yes else @@ -7153,12 +7171,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in finitef do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7157: checking for $ac_func" >&5 +echo "configure:7175: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7218,16 +7236,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for isnanl declaration""... $ac_c" 1>&6 -echo "configure:7222: checking for isnanl declaration" >&5 +echo "configure:7240: checking for isnanl declaration" >&5 cat > conftest.$ac_ext < int main() { isnanl(0); ; return 0; } EOF -if { (eval echo configure:7231: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_isnanl=yes else @@ -7249,12 +7267,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in isnanl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7253: checking for $ac_func" >&5 +echo "configure:7271: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7313,16 +7331,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for isinfl declaration""... $ac_c" 1>&6 -echo "configure:7317: checking for isinfl declaration" >&5 +echo "configure:7335: checking for isinfl declaration" >&5 cat > conftest.$ac_ext < int main() { isinfl(0); ; return 0; } EOF -if { (eval echo configure:7326: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_isinfl=yes else @@ -7344,12 +7362,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in isinfl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7348: checking for $ac_func" >&5 +echo "configure:7366: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7408,16 +7426,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for copysignl declaration""... $ac_c" 1>&6 -echo "configure:7412: checking for copysignl declaration" >&5 +echo "configure:7430: checking for copysignl declaration" >&5 cat > conftest.$ac_ext < int main() { copysignl(0, 0); ; return 0; } EOF -if { (eval echo configure:7421: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7439: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_copysignl=yes else @@ -7439,12 +7457,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in copysignl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7443: checking for $ac_func" >&5 +echo "configure:7461: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7503,16 +7521,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for acosl declaration""... $ac_c" 1>&6 -echo "configure:7507: checking for acosl declaration" >&5 +echo "configure:7525: checking for acosl declaration" >&5 cat > conftest.$ac_ext < int main() { acosl(0); ; return 0; } EOF -if { (eval echo configure:7516: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_acosl=yes else @@ -7534,12 +7552,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in acosl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7538: checking for $ac_func" >&5 +echo "configure:7556: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7598,16 +7616,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for asinl declaration""... $ac_c" 1>&6 -echo "configure:7602: checking for asinl declaration" >&5 +echo "configure:7620: checking for asinl declaration" >&5 cat > conftest.$ac_ext < int main() { asinl(0); ; return 0; } EOF -if { (eval echo configure:7611: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_asinl=yes else @@ -7629,12 +7647,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in asinl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7633: checking for $ac_func" >&5 +echo "configure:7651: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7693,16 +7711,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for atanl declaration""... $ac_c" 1>&6 -echo "configure:7697: checking for atanl declaration" >&5 +echo "configure:7715: checking for atanl declaration" >&5 cat > conftest.$ac_ext < int main() { atanl(0); ; return 0; } EOF -if { (eval echo configure:7706: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_atanl=yes else @@ -7724,12 +7742,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in atanl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7728: checking for $ac_func" >&5 +echo "configure:7746: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7788,16 +7806,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for atan2l declaration""... $ac_c" 1>&6 -echo "configure:7792: checking for atan2l declaration" >&5 +echo "configure:7810: checking for atan2l declaration" >&5 cat > conftest.$ac_ext < int main() { atan2l(0, 0); ; return 0; } EOF -if { (eval echo configure:7801: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7819: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_atan2l=yes else @@ -7819,12 +7837,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in atan2l do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7823: checking for $ac_func" >&5 +echo "configure:7841: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7883,16 +7901,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for ceill declaration""... $ac_c" 1>&6 -echo "configure:7887: checking for ceill declaration" >&5 +echo "configure:7905: checking for ceill declaration" >&5 cat > conftest.$ac_ext < int main() { ceill(0); ; return 0; } EOF -if { (eval echo configure:7896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7914: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_ceill=yes else @@ -7914,12 +7932,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in ceill do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7918: checking for $ac_func" >&5 +echo "configure:7936: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7978,16 +7996,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for cosl declaration""... $ac_c" 1>&6 -echo "configure:7982: checking for cosl declaration" >&5 +echo "configure:8000: checking for cosl declaration" >&5 cat > conftest.$ac_ext < int main() { cosl(0); ; return 0; } EOF -if { (eval echo configure:7991: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_cosl=yes else @@ -8009,12 +8027,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in cosl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8013: checking for $ac_func" >&5 +echo "configure:8031: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8073,16 +8091,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for coshl declaration""... $ac_c" 1>&6 -echo "configure:8077: checking for coshl declaration" >&5 +echo "configure:8095: checking for coshl declaration" >&5 cat > conftest.$ac_ext < int main() { coshl(0); ; return 0; } EOF -if { (eval echo configure:8086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8104: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_coshl=yes else @@ -8104,12 +8122,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in coshl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8108: checking for $ac_func" >&5 +echo "configure:8126: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8168,16 +8186,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for expl declaration""... $ac_c" 1>&6 -echo "configure:8172: checking for expl declaration" >&5 +echo "configure:8190: checking for expl declaration" >&5 cat > conftest.$ac_ext < int main() { expl(0); ; return 0; } EOF -if { (eval echo configure:8181: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8199: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_expl=yes else @@ -8199,12 +8217,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in expl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8203: checking for $ac_func" >&5 +echo "configure:8221: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8263,16 +8281,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for fabsl declaration""... $ac_c" 1>&6 -echo "configure:8267: checking for fabsl declaration" >&5 +echo "configure:8285: checking for fabsl declaration" >&5 cat > conftest.$ac_ext < int main() { fabsl(0); ; return 0; } EOF -if { (eval echo configure:8276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_fabsl=yes else @@ -8294,12 +8312,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in fabsl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8298: checking for $ac_func" >&5 +echo "configure:8316: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8358,16 +8376,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for floorl declaration""... $ac_c" 1>&6 -echo "configure:8362: checking for floorl declaration" >&5 +echo "configure:8380: checking for floorl declaration" >&5 cat > conftest.$ac_ext < int main() { floorl(0); ; return 0; } EOF -if { (eval echo configure:8371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_floorl=yes else @@ -8389,12 +8407,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in floorl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8393: checking for $ac_func" >&5 +echo "configure:8411: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8453,16 +8471,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for fmodl declaration""... $ac_c" 1>&6 -echo "configure:8457: checking for fmodl declaration" >&5 +echo "configure:8475: checking for fmodl declaration" >&5 cat > conftest.$ac_ext < int main() { fmodl(0, 0); ; return 0; } EOF -if { (eval echo configure:8466: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_fmodl=yes else @@ -8484,12 +8502,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in fmodl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8488: checking for $ac_func" >&5 +echo "configure:8506: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8548,16 +8566,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for frexpl declaration""... $ac_c" 1>&6 -echo "configure:8552: checking for frexpl declaration" >&5 +echo "configure:8570: checking for frexpl declaration" >&5 cat > conftest.$ac_ext < int main() { frexpl(0, 0); ; return 0; } EOF -if { (eval echo configure:8561: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_frexpl=yes else @@ -8579,12 +8597,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in frexpl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8583: checking for $ac_func" >&5 +echo "configure:8601: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8643,16 +8661,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for ldexpl declaration""... $ac_c" 1>&6 -echo "configure:8647: checking for ldexpl declaration" >&5 +echo "configure:8665: checking for ldexpl declaration" >&5 cat > conftest.$ac_ext < int main() { ldexpl(0, 0); ; return 0; } EOF -if { (eval echo configure:8656: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_ldexpl=yes else @@ -8674,12 +8692,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in ldexpl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8678: checking for $ac_func" >&5 +echo "configure:8696: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8738,16 +8756,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for logl declaration""... $ac_c" 1>&6 -echo "configure:8742: checking for logl declaration" >&5 +echo "configure:8760: checking for logl declaration" >&5 cat > conftest.$ac_ext < int main() { logl(0); ; return 0; } EOF -if { (eval echo configure:8751: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_logl=yes else @@ -8769,12 +8787,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in logl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8773: checking for $ac_func" >&5 +echo "configure:8791: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8833,16 +8851,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for log10l declaration""... $ac_c" 1>&6 -echo "configure:8837: checking for log10l declaration" >&5 +echo "configure:8855: checking for log10l declaration" >&5 cat > conftest.$ac_ext < int main() { log10l(0); ; return 0; } EOF -if { (eval echo configure:8846: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_log10l=yes else @@ -8864,12 +8882,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in log10l do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8868: checking for $ac_func" >&5 +echo "configure:8886: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8928,16 +8946,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for modfl declaration""... $ac_c" 1>&6 -echo "configure:8932: checking for modfl declaration" >&5 +echo "configure:8950: checking for modfl declaration" >&5 cat > conftest.$ac_ext < int main() { modfl(0, 0); ; return 0; } EOF -if { (eval echo configure:8941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8959: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_modfl=yes else @@ -8959,12 +8977,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in modfl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8963: checking for $ac_func" >&5 +echo "configure:8981: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -9023,16 +9041,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for powl declaration""... $ac_c" 1>&6 -echo "configure:9027: checking for powl declaration" >&5 +echo "configure:9045: checking for powl declaration" >&5 cat > conftest.$ac_ext < int main() { powl(0, 0); ; return 0; } EOF -if { (eval echo configure:9036: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9054: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_powl=yes else @@ -9054,12 +9072,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in powl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9058: checking for $ac_func" >&5 +echo "configure:9076: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -9118,16 +9136,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for sinl declaration""... $ac_c" 1>&6 -echo "configure:9122: checking for sinl declaration" >&5 +echo "configure:9140: checking for sinl declaration" >&5 cat > conftest.$ac_ext < int main() { sinl(0); ; return 0; } EOF -if { (eval echo configure:9131: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_sinl=yes else @@ -9149,12 +9167,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in sinl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9153: checking for $ac_func" >&5 +echo "configure:9171: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -9213,16 +9231,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for sinhl declaration""... $ac_c" 1>&6 -echo "configure:9217: checking for sinhl declaration" >&5 +echo "configure:9235: checking for sinhl declaration" >&5 cat > conftest.$ac_ext < int main() { sinhl(0); ; return 0; } EOF -if { (eval echo configure:9226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9244: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_sinhl=yes else @@ -9244,12 +9262,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in sinhl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9248: checking for $ac_func" >&5 +echo "configure:9266: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -9308,16 +9326,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for sqrtl declaration""... $ac_c" 1>&6 -echo "configure:9312: checking for sqrtl declaration" >&5 +echo "configure:9330: checking for sqrtl declaration" >&5 cat > conftest.$ac_ext < int main() { sqrtl(0); ; return 0; } EOF -if { (eval echo configure:9321: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9339: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_sqrtl=yes else @@ -9339,12 +9357,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in sqrtl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9343: checking for $ac_func" >&5 +echo "configure:9361: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -9403,16 +9421,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for tanl declaration""... $ac_c" 1>&6 -echo "configure:9407: checking for tanl declaration" >&5 +echo "configure:9425: checking for tanl declaration" >&5 cat > conftest.$ac_ext < int main() { tanl(0); ; return 0; } EOF -if { (eval echo configure:9416: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9434: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_tanl=yes else @@ -9434,12 +9452,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in tanl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9438: checking for $ac_func" >&5 +echo "configure:9456: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -9498,16 +9516,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for tanhl declaration""... $ac_c" 1>&6 -echo "configure:9502: checking for tanhl declaration" >&5 +echo "configure:9520: checking for tanhl declaration" >&5 cat > conftest.$ac_ext < int main() { tanhl(0); ; return 0; } EOF -if { (eval echo configure:9511: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_tanhl=yes else @@ -9529,12 +9547,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in tanhl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9533: checking for $ac_func" >&5 +echo "configure:9551: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -9593,16 +9611,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for sincosl declaration""... $ac_c" 1>&6 -echo "configure:9597: checking for sincosl declaration" >&5 +echo "configure:9615: checking for sincosl declaration" >&5 cat > conftest.$ac_ext < int main() { sincosl(0, 0, 0); ; return 0; } EOF -if { (eval echo configure:9606: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9624: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_sincosl=yes else @@ -9624,12 +9642,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in sincosl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9628: checking for $ac_func" >&5 +echo "configure:9646: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -9688,16 +9706,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for finitel declaration""... $ac_c" 1>&6 -echo "configure:9692: checking for finitel declaration" >&5 +echo "configure:9710: checking for finitel declaration" >&5 cat > conftest.$ac_ext < int main() { finitel(0); ; return 0; } EOF -if { (eval echo configure:9701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9719: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_finitel=yes else @@ -9719,12 +9737,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in finitel do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9723: checking for $ac_func" >&5 +echo "configure:9741: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -9784,16 +9802,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _isinf declaration""... $ac_c" 1>&6 -echo "configure:9788: checking for _isinf declaration" >&5 +echo "configure:9806: checking for _isinf declaration" >&5 cat > conftest.$ac_ext < int main() { _isinf(0); ; return 0; } EOF -if { (eval echo configure:9797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__isinf=yes else @@ -9815,12 +9833,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _isinf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9819: checking for $ac_func" >&5 +echo "configure:9837: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -9879,16 +9897,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _isnan declaration""... $ac_c" 1>&6 -echo "configure:9883: checking for _isnan declaration" >&5 +echo "configure:9901: checking for _isnan declaration" >&5 cat > conftest.$ac_ext < int main() { _isnan(0); ; return 0; } EOF -if { (eval echo configure:9892: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9910: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__isnan=yes else @@ -9910,12 +9928,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _isnan do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9914: checking for $ac_func" >&5 +echo "configure:9932: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -9974,16 +9992,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _finite declaration""... $ac_c" 1>&6 -echo "configure:9978: checking for _finite declaration" >&5 +echo "configure:9996: checking for _finite declaration" >&5 cat > conftest.$ac_ext < int main() { _finite(0); ; return 0; } EOF -if { (eval echo configure:9987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10005: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__finite=yes else @@ -10005,12 +10023,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _finite do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10009: checking for $ac_func" >&5 +echo "configure:10027: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -10069,16 +10087,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _copysign declaration""... $ac_c" 1>&6 -echo "configure:10073: checking for _copysign declaration" >&5 +echo "configure:10091: checking for _copysign declaration" >&5 cat > conftest.$ac_ext < int main() { _copysign(0, 0); ; return 0; } EOF -if { (eval echo configure:10082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__copysign=yes else @@ -10100,12 +10118,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _copysign do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10104: checking for $ac_func" >&5 +echo "configure:10122: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -10164,16 +10182,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _sincos declaration""... $ac_c" 1>&6 -echo "configure:10168: checking for _sincos declaration" >&5 +echo "configure:10186: checking for _sincos declaration" >&5 cat > conftest.$ac_ext < int main() { _sincos(0, 0, 0); ; return 0; } EOF -if { (eval echo configure:10177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__sincos=yes else @@ -10195,12 +10213,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _sincos do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10199: checking for $ac_func" >&5 +echo "configure:10217: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -10259,16 +10277,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _fpclass declaration""... $ac_c" 1>&6 -echo "configure:10263: checking for _fpclass declaration" >&5 +echo "configure:10281: checking for _fpclass declaration" >&5 cat > conftest.$ac_ext < int main() { _fpclass(0); ; return 0; } EOF -if { (eval echo configure:10272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__fpclass=yes else @@ -10290,12 +10308,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _fpclass do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10294: checking for $ac_func" >&5 +echo "configure:10312: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -10354,16 +10372,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _qfpclass declaration""... $ac_c" 1>&6 -echo "configure:10358: checking for _qfpclass declaration" >&5 +echo "configure:10376: checking for _qfpclass declaration" >&5 cat > conftest.$ac_ext < int main() { _qfpclass(0); ; return 0; } EOF -if { (eval echo configure:10367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10385: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__qfpclass=yes else @@ -10385,12 +10403,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _qfpclass do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10389: checking for $ac_func" >&5 +echo "configure:10407: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -10450,16 +10468,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _isnanf declaration""... $ac_c" 1>&6 -echo "configure:10454: checking for _isnanf declaration" >&5 +echo "configure:10472: checking for _isnanf declaration" >&5 cat > conftest.$ac_ext < int main() { _isnanf(0); ; return 0; } EOF -if { (eval echo configure:10463: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__isnanf=yes else @@ -10481,12 +10499,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _isnanf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10485: checking for $ac_func" >&5 +echo "configure:10503: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -10545,16 +10563,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _isinff declaration""... $ac_c" 1>&6 -echo "configure:10549: checking for _isinff declaration" >&5 +echo "configure:10567: checking for _isinff declaration" >&5 cat > conftest.$ac_ext < int main() { _isinff(0); ; return 0; } EOF -if { (eval echo configure:10558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__isinff=yes else @@ -10576,12 +10594,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _isinff do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10580: checking for $ac_func" >&5 +echo "configure:10598: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -10640,16 +10658,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _acosf declaration""... $ac_c" 1>&6 -echo "configure:10644: checking for _acosf declaration" >&5 +echo "configure:10662: checking for _acosf declaration" >&5 cat > conftest.$ac_ext < int main() { _acosf(0); ; return 0; } EOF -if { (eval echo configure:10653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10671: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__acosf=yes else @@ -10671,12 +10689,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _acosf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10675: checking for $ac_func" >&5 +echo "configure:10693: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -10735,16 +10753,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _asinf declaration""... $ac_c" 1>&6 -echo "configure:10739: checking for _asinf declaration" >&5 +echo "configure:10757: checking for _asinf declaration" >&5 cat > conftest.$ac_ext < int main() { _asinf(0); ; return 0; } EOF -if { (eval echo configure:10748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__asinf=yes else @@ -10766,12 +10784,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _asinf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10770: checking for $ac_func" >&5 +echo "configure:10788: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -10830,16 +10848,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _atanf declaration""... $ac_c" 1>&6 -echo "configure:10834: checking for _atanf declaration" >&5 +echo "configure:10852: checking for _atanf declaration" >&5 cat > conftest.$ac_ext < int main() { _atanf(0); ; return 0; } EOF -if { (eval echo configure:10843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10861: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__atanf=yes else @@ -10861,12 +10879,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _atanf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10865: checking for $ac_func" >&5 +echo "configure:10883: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -10925,16 +10943,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _atan2f declaration""... $ac_c" 1>&6 -echo "configure:10929: checking for _atan2f declaration" >&5 +echo "configure:10947: checking for _atan2f declaration" >&5 cat > conftest.$ac_ext < int main() { _atan2f(0, 0); ; return 0; } EOF -if { (eval echo configure:10938: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10956: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__atan2f=yes else @@ -10956,12 +10974,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _atan2f do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10960: checking for $ac_func" >&5 +echo "configure:10978: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -11020,16 +11038,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _ceilf declaration""... $ac_c" 1>&6 -echo "configure:11024: checking for _ceilf declaration" >&5 +echo "configure:11042: checking for _ceilf declaration" >&5 cat > conftest.$ac_ext < int main() { _ceilf(0); ; return 0; } EOF -if { (eval echo configure:11033: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__ceilf=yes else @@ -11051,12 +11069,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _ceilf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11055: checking for $ac_func" >&5 +echo "configure:11073: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -11115,16 +11133,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _cosf declaration""... $ac_c" 1>&6 -echo "configure:11119: checking for _cosf declaration" >&5 +echo "configure:11137: checking for _cosf declaration" >&5 cat > conftest.$ac_ext < int main() { _cosf(0); ; return 0; } EOF -if { (eval echo configure:11128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11146: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__cosf=yes else @@ -11146,12 +11164,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _cosf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11150: checking for $ac_func" >&5 +echo "configure:11168: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -11210,16 +11228,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _coshf declaration""... $ac_c" 1>&6 -echo "configure:11214: checking for _coshf declaration" >&5 +echo "configure:11232: checking for _coshf declaration" >&5 cat > conftest.$ac_ext < int main() { _coshf(0); ; return 0; } EOF -if { (eval echo configure:11223: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11241: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__coshf=yes else @@ -11241,12 +11259,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _coshf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11245: checking for $ac_func" >&5 +echo "configure:11263: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -11305,16 +11323,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _expf declaration""... $ac_c" 1>&6 -echo "configure:11309: checking for _expf declaration" >&5 +echo "configure:11327: checking for _expf declaration" >&5 cat > conftest.$ac_ext < int main() { _expf(0); ; return 0; } EOF -if { (eval echo configure:11318: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11336: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__expf=yes else @@ -11336,12 +11354,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _expf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11340: checking for $ac_func" >&5 +echo "configure:11358: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -11400,16 +11418,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _fabsf declaration""... $ac_c" 1>&6 -echo "configure:11404: checking for _fabsf declaration" >&5 +echo "configure:11422: checking for _fabsf declaration" >&5 cat > conftest.$ac_ext < int main() { _fabsf(0); ; return 0; } EOF -if { (eval echo configure:11413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11431: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__fabsf=yes else @@ -11431,12 +11449,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _fabsf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11435: checking for $ac_func" >&5 +echo "configure:11453: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -11495,16 +11513,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _floorf declaration""... $ac_c" 1>&6 -echo "configure:11499: checking for _floorf declaration" >&5 +echo "configure:11517: checking for _floorf declaration" >&5 cat > conftest.$ac_ext < int main() { _floorf(0); ; return 0; } EOF -if { (eval echo configure:11508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11526: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__floorf=yes else @@ -11526,12 +11544,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _floorf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11530: checking for $ac_func" >&5 +echo "configure:11548: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -11590,16 +11608,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _fmodf declaration""... $ac_c" 1>&6 -echo "configure:11594: checking for _fmodf declaration" >&5 +echo "configure:11612: checking for _fmodf declaration" >&5 cat > conftest.$ac_ext < int main() { _fmodf(0, 0); ; return 0; } EOF -if { (eval echo configure:11603: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11621: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__fmodf=yes else @@ -11621,12 +11639,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _fmodf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11625: checking for $ac_func" >&5 +echo "configure:11643: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -11685,16 +11703,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _frexpf declaration""... $ac_c" 1>&6 -echo "configure:11689: checking for _frexpf declaration" >&5 +echo "configure:11707: checking for _frexpf declaration" >&5 cat > conftest.$ac_ext < int main() { _frexpf(0, 0); ; return 0; } EOF -if { (eval echo configure:11698: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11716: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__frexpf=yes else @@ -11716,12 +11734,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _frexpf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11720: checking for $ac_func" >&5 +echo "configure:11738: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -11780,16 +11798,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _ldexpf declaration""... $ac_c" 1>&6 -echo "configure:11784: checking for _ldexpf declaration" >&5 +echo "configure:11802: checking for _ldexpf declaration" >&5 cat > conftest.$ac_ext < int main() { _ldexpf(0, 0); ; return 0; } EOF -if { (eval echo configure:11793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11811: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__ldexpf=yes else @@ -11811,12 +11829,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _ldexpf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11815: checking for $ac_func" >&5 +echo "configure:11833: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -11875,16 +11893,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _logf declaration""... $ac_c" 1>&6 -echo "configure:11879: checking for _logf declaration" >&5 +echo "configure:11897: checking for _logf declaration" >&5 cat > conftest.$ac_ext < int main() { _logf(0); ; return 0; } EOF -if { (eval echo configure:11888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11906: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__logf=yes else @@ -11906,12 +11924,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _logf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11910: checking for $ac_func" >&5 +echo "configure:11928: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -11970,16 +11988,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _log10f declaration""... $ac_c" 1>&6 -echo "configure:11974: checking for _log10f declaration" >&5 +echo "configure:11992: checking for _log10f declaration" >&5 cat > conftest.$ac_ext < int main() { _log10f(0); ; return 0; } EOF -if { (eval echo configure:11983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12001: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__log10f=yes else @@ -12001,12 +12019,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _log10f do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12005: checking for $ac_func" >&5 +echo "configure:12023: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -12065,16 +12083,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _modff declaration""... $ac_c" 1>&6 -echo "configure:12069: checking for _modff declaration" >&5 +echo "configure:12087: checking for _modff declaration" >&5 cat > conftest.$ac_ext < int main() { _modff(0, 0); ; return 0; } EOF -if { (eval echo configure:12078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__modff=yes else @@ -12096,12 +12114,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _modff do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12100: checking for $ac_func" >&5 +echo "configure:12118: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -12160,16 +12178,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _powf declaration""... $ac_c" 1>&6 -echo "configure:12164: checking for _powf declaration" >&5 +echo "configure:12182: checking for _powf declaration" >&5 cat > conftest.$ac_ext < int main() { _powf(0, 0); ; return 0; } EOF -if { (eval echo configure:12173: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12191: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__powf=yes else @@ -12191,12 +12209,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _powf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12195: checking for $ac_func" >&5 +echo "configure:12213: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -12255,16 +12273,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _sinf declaration""... $ac_c" 1>&6 -echo "configure:12259: checking for _sinf declaration" >&5 +echo "configure:12277: checking for _sinf declaration" >&5 cat > conftest.$ac_ext < int main() { _sinf(0); ; return 0; } EOF -if { (eval echo configure:12268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12286: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__sinf=yes else @@ -12286,12 +12304,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _sinf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12290: checking for $ac_func" >&5 +echo "configure:12308: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -12350,16 +12368,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _sinhf declaration""... $ac_c" 1>&6 -echo "configure:12354: checking for _sinhf declaration" >&5 +echo "configure:12372: checking for _sinhf declaration" >&5 cat > conftest.$ac_ext < int main() { _sinhf(0); ; return 0; } EOF -if { (eval echo configure:12363: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12381: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__sinhf=yes else @@ -12381,12 +12399,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _sinhf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12385: checking for $ac_func" >&5 +echo "configure:12403: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -12445,16 +12463,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _sqrtf declaration""... $ac_c" 1>&6 -echo "configure:12449: checking for _sqrtf declaration" >&5 +echo "configure:12467: checking for _sqrtf declaration" >&5 cat > conftest.$ac_ext < int main() { _sqrtf(0); ; return 0; } EOF -if { (eval echo configure:12458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__sqrtf=yes else @@ -12476,12 +12494,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _sqrtf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12480: checking for $ac_func" >&5 +echo "configure:12498: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -12540,16 +12558,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _tanf declaration""... $ac_c" 1>&6 -echo "configure:12544: checking for _tanf declaration" >&5 +echo "configure:12562: checking for _tanf declaration" >&5 cat > conftest.$ac_ext < int main() { _tanf(0); ; return 0; } EOF -if { (eval echo configure:12553: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12571: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__tanf=yes else @@ -12571,12 +12589,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _tanf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12575: checking for $ac_func" >&5 +echo "configure:12593: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -12635,16 +12653,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _tanhf declaration""... $ac_c" 1>&6 -echo "configure:12639: checking for _tanhf declaration" >&5 +echo "configure:12657: checking for _tanhf declaration" >&5 cat > conftest.$ac_ext < int main() { _tanhf(0); ; return 0; } EOF -if { (eval echo configure:12648: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12666: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__tanhf=yes else @@ -12666,12 +12684,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _tanhf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12670: checking for $ac_func" >&5 +echo "configure:12688: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -12730,16 +12748,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _sincosf declaration""... $ac_c" 1>&6 -echo "configure:12734: checking for _sincosf declaration" >&5 +echo "configure:12752: checking for _sincosf declaration" >&5 cat > conftest.$ac_ext < int main() { _sincosf(0, 0, 0); ; return 0; } EOF -if { (eval echo configure:12743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__sincosf=yes else @@ -12761,12 +12779,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _sincosf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12765: checking for $ac_func" >&5 +echo "configure:12783: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -12825,16 +12843,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _finitef declaration""... $ac_c" 1>&6 -echo "configure:12829: checking for _finitef declaration" >&5 +echo "configure:12847: checking for _finitef declaration" >&5 cat > conftest.$ac_ext < int main() { _finitef(0); ; return 0; } EOF -if { (eval echo configure:12838: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__finitef=yes else @@ -12856,12 +12874,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _finitef do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12860: checking for $ac_func" >&5 +echo "configure:12878: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -12921,16 +12939,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _isnanl declaration""... $ac_c" 1>&6 -echo "configure:12925: checking for _isnanl declaration" >&5 +echo "configure:12943: checking for _isnanl declaration" >&5 cat > conftest.$ac_ext < int main() { _isnanl(0); ; return 0; } EOF -if { (eval echo configure:12934: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12952: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__isnanl=yes else @@ -12952,12 +12970,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _isnanl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12956: checking for $ac_func" >&5 +echo "configure:12974: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -13016,16 +13034,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _isinfl declaration""... $ac_c" 1>&6 -echo "configure:13020: checking for _isinfl declaration" >&5 +echo "configure:13038: checking for _isinfl declaration" >&5 cat > conftest.$ac_ext < int main() { _isinfl(0); ; return 0; } EOF -if { (eval echo configure:13029: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13047: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__isinfl=yes else @@ -13047,12 +13065,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _isinfl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13051: checking for $ac_func" >&5 +echo "configure:13069: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -13111,16 +13129,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _copysignl declaration""... $ac_c" 1>&6 -echo "configure:13115: checking for _copysignl declaration" >&5 +echo "configure:13133: checking for _copysignl declaration" >&5 cat > conftest.$ac_ext < int main() { _copysignl(0, 0); ; return 0; } EOF -if { (eval echo configure:13124: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13142: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__copysignl=yes else @@ -13142,12 +13160,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _copysignl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13146: checking for $ac_func" >&5 +echo "configure:13164: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -13206,16 +13224,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _acosl declaration""... $ac_c" 1>&6 -echo "configure:13210: checking for _acosl declaration" >&5 +echo "configure:13228: checking for _acosl declaration" >&5 cat > conftest.$ac_ext < int main() { _acosl(0); ; return 0; } EOF -if { (eval echo configure:13219: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__acosl=yes else @@ -13237,12 +13255,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _acosl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13241: checking for $ac_func" >&5 +echo "configure:13259: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -13301,16 +13319,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _asinl declaration""... $ac_c" 1>&6 -echo "configure:13305: checking for _asinl declaration" >&5 +echo "configure:13323: checking for _asinl declaration" >&5 cat > conftest.$ac_ext < int main() { _asinl(0); ; return 0; } EOF -if { (eval echo configure:13314: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__asinl=yes else @@ -13332,12 +13350,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _asinl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13336: checking for $ac_func" >&5 +echo "configure:13354: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -13396,16 +13414,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _atanl declaration""... $ac_c" 1>&6 -echo "configure:13400: checking for _atanl declaration" >&5 +echo "configure:13418: checking for _atanl declaration" >&5 cat > conftest.$ac_ext < int main() { _atanl(0); ; return 0; } EOF -if { (eval echo configure:13409: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13427: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__atanl=yes else @@ -13427,12 +13445,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _atanl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13431: checking for $ac_func" >&5 +echo "configure:13449: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -13491,16 +13509,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _atan2l declaration""... $ac_c" 1>&6 -echo "configure:13495: checking for _atan2l declaration" >&5 +echo "configure:13513: checking for _atan2l declaration" >&5 cat > conftest.$ac_ext < int main() { _atan2l(0, 0); ; return 0; } EOF -if { (eval echo configure:13504: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13522: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__atan2l=yes else @@ -13522,12 +13540,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _atan2l do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13526: checking for $ac_func" >&5 +echo "configure:13544: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -13586,16 +13604,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _ceill declaration""... $ac_c" 1>&6 -echo "configure:13590: checking for _ceill declaration" >&5 +echo "configure:13608: checking for _ceill declaration" >&5 cat > conftest.$ac_ext < int main() { _ceill(0); ; return 0; } EOF -if { (eval echo configure:13599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__ceill=yes else @@ -13617,12 +13635,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _ceill do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13621: checking for $ac_func" >&5 +echo "configure:13639: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -13681,16 +13699,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _cosl declaration""... $ac_c" 1>&6 -echo "configure:13685: checking for _cosl declaration" >&5 +echo "configure:13703: checking for _cosl declaration" >&5 cat > conftest.$ac_ext < int main() { _cosl(0); ; return 0; } EOF -if { (eval echo configure:13694: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__cosl=yes else @@ -13712,12 +13730,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _cosl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13716: checking for $ac_func" >&5 +echo "configure:13734: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -13776,16 +13794,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _coshl declaration""... $ac_c" 1>&6 -echo "configure:13780: checking for _coshl declaration" >&5 +echo "configure:13798: checking for _coshl declaration" >&5 cat > conftest.$ac_ext < int main() { _coshl(0); ; return 0; } EOF -if { (eval echo configure:13789: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__coshl=yes else @@ -13807,12 +13825,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _coshl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13811: checking for $ac_func" >&5 +echo "configure:13829: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -13871,16 +13889,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _expl declaration""... $ac_c" 1>&6 -echo "configure:13875: checking for _expl declaration" >&5 +echo "configure:13893: checking for _expl declaration" >&5 cat > conftest.$ac_ext < int main() { _expl(0); ; return 0; } EOF -if { (eval echo configure:13884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13902: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__expl=yes else @@ -13902,12 +13920,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _expl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13906: checking for $ac_func" >&5 +echo "configure:13924: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -13966,16 +13984,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _fabsl declaration""... $ac_c" 1>&6 -echo "configure:13970: checking for _fabsl declaration" >&5 +echo "configure:13988: checking for _fabsl declaration" >&5 cat > conftest.$ac_ext < int main() { _fabsl(0); ; return 0; } EOF -if { (eval echo configure:13979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13997: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__fabsl=yes else @@ -13997,12 +14015,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _fabsl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:14001: checking for $ac_func" >&5 +echo "configure:14019: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -14061,16 +14079,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _floorl declaration""... $ac_c" 1>&6 -echo "configure:14065: checking for _floorl declaration" >&5 +echo "configure:14083: checking for _floorl declaration" >&5 cat > conftest.$ac_ext < int main() { _floorl(0); ; return 0; } EOF -if { (eval echo configure:14074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14092: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__floorl=yes else @@ -14092,12 +14110,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _floorl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:14096: checking for $ac_func" >&5 +echo "configure:14114: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -14156,16 +14174,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _fmodl declaration""... $ac_c" 1>&6 -echo "configure:14160: checking for _fmodl declaration" >&5 +echo "configure:14178: checking for _fmodl declaration" >&5 cat > conftest.$ac_ext < int main() { _fmodl(0, 0); ; return 0; } EOF -if { (eval echo configure:14169: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__fmodl=yes else @@ -14187,12 +14205,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _fmodl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:14191: checking for $ac_func" >&5 +echo "configure:14209: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -14251,16 +14269,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _frexpl declaration""... $ac_c" 1>&6 -echo "configure:14255: checking for _frexpl declaration" >&5 +echo "configure:14273: checking for _frexpl declaration" >&5 cat > conftest.$ac_ext < int main() { _frexpl(0, 0); ; return 0; } EOF -if { (eval echo configure:14264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__frexpl=yes else @@ -14282,12 +14300,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _frexpl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:14286: checking for $ac_func" >&5 +echo "configure:14304: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -14346,16 +14364,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _ldexpl declaration""... $ac_c" 1>&6 -echo "configure:14350: checking for _ldexpl declaration" >&5 +echo "configure:14368: checking for _ldexpl declaration" >&5 cat > conftest.$ac_ext < int main() { _ldexpl(0, 0); ; return 0; } EOF -if { (eval echo configure:14359: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14377: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__ldexpl=yes else @@ -14377,12 +14395,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _ldexpl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:14381: checking for $ac_func" >&5 +echo "configure:14399: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -14441,16 +14459,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _logl declaration""... $ac_c" 1>&6 -echo "configure:14445: checking for _logl declaration" >&5 +echo "configure:14463: checking for _logl declaration" >&5 cat > conftest.$ac_ext < int main() { _logl(0); ; return 0; } EOF -if { (eval echo configure:14454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__logl=yes else @@ -14472,12 +14490,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _logl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:14476: checking for $ac_func" >&5 +echo "configure:14494: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -14536,16 +14554,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _log10l declaration""... $ac_c" 1>&6 -echo "configure:14540: checking for _log10l declaration" >&5 +echo "configure:14558: checking for _log10l declaration" >&5 cat > conftest.$ac_ext < int main() { _log10l(0); ; return 0; } EOF -if { (eval echo configure:14549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14567: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__log10l=yes else @@ -14567,12 +14585,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _log10l do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:14571: checking for $ac_func" >&5 +echo "configure:14589: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -14631,16 +14649,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _modfl declaration""... $ac_c" 1>&6 -echo "configure:14635: checking for _modfl declaration" >&5 +echo "configure:14653: checking for _modfl declaration" >&5 cat > conftest.$ac_ext < int main() { _modfl(0, 0); ; return 0; } EOF -if { (eval echo configure:14644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__modfl=yes else @@ -14662,12 +14680,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _modfl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:14666: checking for $ac_func" >&5 +echo "configure:14684: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -14726,16 +14744,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _powl declaration""... $ac_c" 1>&6 -echo "configure:14730: checking for _powl declaration" >&5 +echo "configure:14748: checking for _powl declaration" >&5 cat > conftest.$ac_ext < int main() { _powl(0, 0); ; return 0; } EOF -if { (eval echo configure:14739: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14757: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__powl=yes else @@ -14757,12 +14775,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _powl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:14761: checking for $ac_func" >&5 +echo "configure:14779: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -14821,16 +14839,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _sinl declaration""... $ac_c" 1>&6 -echo "configure:14825: checking for _sinl declaration" >&5 +echo "configure:14843: checking for _sinl declaration" >&5 cat > conftest.$ac_ext < int main() { _sinl(0); ; return 0; } EOF -if { (eval echo configure:14834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__sinl=yes else @@ -14852,12 +14870,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _sinl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:14856: checking for $ac_func" >&5 +echo "configure:14874: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -14916,16 +14934,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _sinhl declaration""... $ac_c" 1>&6 -echo "configure:14920: checking for _sinhl declaration" >&5 +echo "configure:14938: checking for _sinhl declaration" >&5 cat > conftest.$ac_ext < int main() { _sinhl(0); ; return 0; } EOF -if { (eval echo configure:14929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14947: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__sinhl=yes else @@ -14947,12 +14965,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _sinhl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:14951: checking for $ac_func" >&5 +echo "configure:14969: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -15011,16 +15029,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _sqrtl declaration""... $ac_c" 1>&6 -echo "configure:15015: checking for _sqrtl declaration" >&5 +echo "configure:15033: checking for _sqrtl declaration" >&5 cat > conftest.$ac_ext < int main() { _sqrtl(0); ; return 0; } EOF -if { (eval echo configure:15024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:15042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__sqrtl=yes else @@ -15042,12 +15060,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _sqrtl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:15046: checking for $ac_func" >&5 +echo "configure:15064: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -15106,16 +15124,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _tanl declaration""... $ac_c" 1>&6 -echo "configure:15110: checking for _tanl declaration" >&5 +echo "configure:15128: checking for _tanl declaration" >&5 cat > conftest.$ac_ext < int main() { _tanl(0); ; return 0; } EOF -if { (eval echo configure:15119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:15137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__tanl=yes else @@ -15137,12 +15155,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _tanl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:15141: checking for $ac_func" >&5 +echo "configure:15159: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -15201,16 +15219,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _tanhl declaration""... $ac_c" 1>&6 -echo "configure:15205: checking for _tanhl declaration" >&5 +echo "configure:15223: checking for _tanhl declaration" >&5 cat > conftest.$ac_ext < int main() { _tanhl(0); ; return 0; } EOF -if { (eval echo configure:15214: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:15232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__tanhl=yes else @@ -15232,12 +15250,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _tanhl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:15236: checking for $ac_func" >&5 +echo "configure:15254: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -15296,16 +15314,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _sincosl declaration""... $ac_c" 1>&6 -echo "configure:15300: checking for _sincosl declaration" >&5 +echo "configure:15318: checking for _sincosl declaration" >&5 cat > conftest.$ac_ext < int main() { _sincosl(0, 0, 0); ; return 0; } EOF -if { (eval echo configure:15309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:15327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__sincosl=yes else @@ -15327,12 +15345,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _sincosl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:15331: checking for $ac_func" >&5 +echo "configure:15349: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -15391,16 +15409,16 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for _finitel declaration""... $ac_c" 1>&6 -echo "configure:15395: checking for _finitel declaration" >&5 +echo "configure:15413: checking for _finitel declaration" >&5 cat > conftest.$ac_ext < int main() { _finitel(0); ; return 0; } EOF -if { (eval echo configure:15404: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:15422: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use__finitel=yes else @@ -15422,12 +15440,12 @@ cross_compiling=$ac_cv_prog_cc_cross for ac_func in _finitel do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:15426: checking for $ac_func" >&5 +echo "configure:15444: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -15485,17 +15503,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:15489: checking for $ac_hdr" >&5 +echo "configure:15507: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:15499: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:15517: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -15526,12 +15544,12 @@ done ctan ctanf ctanh ctanhf carg cargf nan hypot hypotf atan2f expf copysignf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:15530: checking for $ac_func" >&5 +echo "configure:15548: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -15589,12 +15607,12 @@ done csqrtl ctanhl ctanl cargl hypotl signbitl c_logl clog10l do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:15593: checking for $ac_func" >&5 +echo "configure:15611: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -15651,7 +15669,7 @@ done echo $ac_n "checking for GNU C++ __complex__ support""... $ac_c" 1>&6 -echo "configure:15655: checking for GNU C++ __complex__ support" >&5 +echo "configure:15673: checking for GNU C++ __complex__ support" >&5 if eval "test \"`echo '$''{'glibcpp_cv_complex'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -15665,7 +15683,7 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:15696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* glibcpp_cv_complex=ok else @@ -15704,7 +15722,7 @@ EOF fi echo $ac_n "checking for GNU C++ __complex__ float support""... $ac_c" 1>&6 -echo "configure:15708: checking for GNU C++ __complex__ float support" >&5 +echo "configure:15726: checking for GNU C++ __complex__ float support" >&5 if eval "test \"`echo '$''{'glibcpp_cv_float_complex'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -15737,14 +15755,14 @@ cross_compiling=$ac_cv_prog_cxx_cross }; EOB cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:15766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* glibcpp_cv_float_complex=ok else @@ -15777,17 +15795,17 @@ EOF ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for wchar.h""... $ac_c" 1>&6 -echo "configure:15781: checking for wchar.h" >&5 +echo "configure:15799: checking for wchar.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:15791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:15809: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -15811,17 +15829,17 @@ fi ac_safe=`echo "wctype.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for wctype.h""... $ac_c" 1>&6 -echo "configure:15815: checking for wctype.h" >&5 +echo "configure:15833: checking for wctype.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:15825: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:15843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -15847,16 +15865,16 @@ fi if test x"$ac_has_wchar_h" = xyes && test x"$ac_has_wctype_h" = xyes; then echo $ac_n "checking for mbstate_t""... $ac_c" 1>&6 -echo "configure:15851: checking for mbstate_t" >&5 +echo "configure:15869: checking for mbstate_t" >&5 cat > conftest.$ac_ext < int main() { mbstate_t teststate; ; return 0; } EOF -if { (eval echo configure:15860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:15878: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* use_native_mbstatet=yes else @@ -15875,16 +15893,16 @@ EOF fi echo $ac_n "checking for WCHAR_MIN and WCHAR_MAX""... $ac_c" 1>&6 -echo "configure:15879: checking for WCHAR_MIN and WCHAR_MAX" >&5 +echo "configure:15897: checking for WCHAR_MIN and WCHAR_MAX" >&5 cat > conftest.$ac_ext < int main() { int i = WCHAR_MIN; int j = WCHAR_MAX; ; return 0; } EOF -if { (eval echo configure:15888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:15906: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* has_wchar_minmax=yes else @@ -15897,9 +15915,9 @@ rm -f conftest* echo "$ac_t""$has_wchar_minmax" 1>&6 echo $ac_n "checking for WEOF""... $ac_c" 1>&6 -echo "configure:15901: checking for WEOF" >&5 +echo "configure:15919: checking for WEOF" >&5 cat > conftest.$ac_ext < @@ -15908,7 +15926,7 @@ int main() { wint_t i = WEOF; ; return 0; } EOF -if { (eval echo configure:15912: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:15930: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* has_weof=yes else @@ -15923,12 +15941,12 @@ rm -f conftest* for ac_func in wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:15927: checking for $ac_func" >&5 +echo "configure:15945: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -15978,7 +15996,7 @@ done echo $ac_n "checking for ISO C9X wchar_t support""... $ac_c" 1>&6 -echo "configure:15982: checking for ISO C9X wchar_t support" >&5 +echo "configure:16000: checking for ISO C9X wchar_t support" >&5 if test x"$has_weof" = xyes && test x"$has_wchar_minmax" = xyes && test x"$ac_wfuncs" = xyes; then ac_isoC9X_wchar_t=yes else @@ -15988,17 +16006,17 @@ echo "configure:15982: checking for ISO C9X wchar_t support" >&5 ac_safe=`echo "iconv.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for iconv.h""... $ac_c" 1>&6 -echo "configure:15992: checking for iconv.h" >&5 +echo "configure:16010: checking for iconv.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:16002: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:16020: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -16023,12 +16041,12 @@ fi for ac_func in iconv_open iconv_close iconv do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:16027: checking for $ac_func" >&5 +echo "configure:16045: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -16078,7 +16096,7 @@ done echo $ac_n "checking for XPG2 wchar_t support""... $ac_c" 1>&6 -echo "configure:16082: checking for XPG2 wchar_t support" >&5 +echo "configure:16100: checking for XPG2 wchar_t support" >&5 if test x"$ac_has_iconv_h" = xyes && test x"$ac_XPG2funcs" = xyes; then ac_XPG2_wchar_t=yes else @@ -16087,7 +16105,7 @@ echo "configure:16082: checking for XPG2 wchar_t support" >&5 echo "$ac_t""$ac_XPG2_wchar_t" 1>&6 echo $ac_n "checking for enabled wchar_t specializations""... $ac_c" 1>&6 -echo "configure:16091: checking for enabled wchar_t specializations" >&5 +echo "configure:16109: checking for enabled wchar_t specializations" >&5 if test x"$ac_isoC9X_wchar_t" = xyes && test x"$ac_XPG2_wchar_t" = xyes; then libinst_wstring_la="libinst-wstring.la" cat >> confdefs.h <<\EOF @@ -16112,17 +16130,17 @@ EOF ac_safe=`echo "ctype.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ctype.h""... $ac_c" 1>&6 -echo "configure:16116: checking for ctype.h" >&5 +echo "configure:16134: checking for ctype.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:16126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:16144: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -16143,9 +16161,9 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then ctype_default=yes echo $ac_n "checking for gnu-linux ""... $ac_c" 1>&6 -echo "configure:16147: checking for gnu-linux " >&5 +echo "configure:16165: checking for gnu-linux " >&5 cat > conftest.$ac_ext < int main() { @@ -16156,7 +16174,7 @@ int + __ctype_tolower[a] + __ctype_toupper[a] + __ctype_b[a];} ; return 0; } EOF -if { (eval echo configure:16160: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:16178: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* \ ctype_linux=yes @@ -16175,9 +16193,9 @@ rm -f conftest* if test $ctype_default = "yes"; then echo $ac_n "checking for freebsd 4.0 ""... $ac_c" 1>&6 -echo "configure:16179: checking for freebsd 4.0 " >&5 +echo "configure:16197: checking for freebsd 4.0 " >&5 cat > conftest.$ac_ext < int main() { @@ -16187,7 +16205,7 @@ int + _CTYPE_D + _CTYPE_P + _CTYPE_X + _CTYPE_G ;} ; return 0; } EOF -if { (eval echo configure:16191: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:16209: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* \ ctype_bsd=yes @@ -16207,9 +16225,9 @@ rm -f conftest* if test $ctype_default = "yes"; then echo $ac_n "checking for freebsd 3.4 ""... $ac_c" 1>&6 -echo "configure:16211: checking for freebsd 3.4 " >&5 +echo "configure:16229: checking for freebsd 3.4 " >&5 cat > conftest.$ac_ext < int main() { @@ -16219,7 +16237,7 @@ int + _D + _P + _X + _G + __istype (a, 0);} ; return 0; } EOF -if { (eval echo configure:16223: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:16241: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* \ ctype_freebsd34=yes @@ -16239,9 +16257,9 @@ rm -f conftest* if test $ctype_default = "yes"; then echo $ac_n "checking for solaris 2.6,7,8 ""... $ac_c" 1>&6 -echo "configure:16243: checking for solaris 2.6,7,8 " >&5 +echo "configure:16261: checking for solaris 2.6,7,8 " >&5 cat > conftest.$ac_ext < int main() { @@ -16252,7 +16270,7 @@ int + __trans_lower[a] + __trans_upper[a] + __ctype_mask[a];} ; return 0; } EOF -if { (eval echo configure:16256: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:16274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* \ ctype_solaris=yes @@ -16267,7 +16285,7 @@ rm -f conftest* if test $ctype_solaris = "yes"; then echo $ac_n "checking for version""... $ac_c" 1>&6 -echo "configure:16271: checking for version" >&5 +echo "configure:16289: checking for version" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CXXCPP $CPPFLAGS' @@ -16276,14 +16294,14 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext < int main() { typedef long* __to_type; __to_type const& _M_toupper = __trans_upper; ; return 0; } EOF -if { (eval echo configure:16287: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:16305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* \ ctype_solaris26=yes @@ -16315,9 +16333,9 @@ cross_compiling=$ac_cv_prog_cc_cross if test $ctype_default = "yes"; then echo $ac_n "checking for solaris 2.5.1 ""... $ac_c" 1>&6 -echo "configure:16319: checking for solaris 2.5.1 " >&5 +echo "configure:16337: checking for solaris 2.5.1 " >&5 cat > conftest.$ac_ext < int main() { @@ -16327,7 +16345,7 @@ int + __ctype[a];} ; return 0; } EOF -if { (eval echo configure:16331: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:16349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* \ ctype_solaris25=yes @@ -16347,9 +16365,9 @@ rm -f conftest* if test $ctype_default = "yes"; then echo $ac_n "checking for aix ""... $ac_c" 1>&6 -echo "configure:16351: checking for aix " >&5 +echo "configure:16369: checking for aix " >&5 cat > conftest.$ac_ext < int main() { @@ -16360,7 +16378,7 @@ int + _VALC('a') + _IS('c', 0);} ; return 0; } EOF -if { (eval echo configure:16364: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:16382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* \ ctype_aix=yes @@ -16380,9 +16398,9 @@ rm -f conftest* if test $ctype_default = "yes"; then echo $ac_n "checking for newlib ""... $ac_c" 1>&6 -echo "configure:16384: checking for newlib " >&5 +echo "configure:16402: checking for newlib " >&5 cat > conftest.$ac_ext < int main() { @@ -16392,7 +16410,7 @@ int + _ctype_[a];} ; return 0; } EOF -if { (eval echo configure:16396: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:16414: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* \ ctype_newlib=yes @@ -16426,17 +16444,17 @@ fi do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:16430: checking for $ac_hdr" >&5 +echo "configure:16448: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:16440: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:16458: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -16465,12 +16483,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:16469: checking for $ac_func" >&5 +echo "configure:16487: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -16518,7 +16536,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:16522: checking for working mmap" >&5 +echo "configure:16540: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -16526,7 +16544,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:16688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -16729,19 +16747,19 @@ fi if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:16733: checking for LC_MESSAGES" >&5 +echo "configure:16751: checking for LC_MESSAGES" >&5 if eval "test \"`echo '$''{'ac_cv_val_LC_MESSAGES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return LC_MESSAGES ; return 0; } EOF -if { (eval echo configure:16745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_val_LC_MESSAGES=yes else @@ -16977,6 +16995,8 @@ s%@CSTDIO_H@%$CSTDIO_H%g s%@CSTDIO_CC@%$CSTDIO_CC%g s%@GLIBCPP_NEED_LIBIO_TRUE@%$GLIBCPP_NEED_LIBIO_TRUE%g s%@GLIBCPP_NEED_LIBIO_FALSE@%$GLIBCPP_NEED_LIBIO_FALSE%g +s%@GLIBCPP_NEED_WLIBIO_TRUE@%$GLIBCPP_NEED_WLIBIO_TRUE%g +s%@GLIBCPP_NEED_WLIBIO_FALSE@%$GLIBCPP_NEED_WLIBIO_FALSE%g s%@CSHADOWFLAGS@%$CSHADOWFLAGS%g s%@CSHADOW_INCLUDES@%$CSHADOW_INCLUDES%g s%@GLIBCPP_USE_CSHADOW_TRUE@%$GLIBCPP_USE_CSHADOW_TRUE%g diff --git a/libstdc++-v3/libio/Makefile.am b/libstdc++-v3/libio/Makefile.am index 797f5e243fe7..289afc238dda 100644 --- a/libstdc++-v3/libio/Makefile.am +++ b/libstdc++-v3/libio/Makefile.am @@ -23,11 +23,27 @@ AUTOMAKE_OPTIONS = 1.3 cygnus +# Passed down for cross compilers, canadian crosses. +TOPLEVEL_INCLUDES = -I$(includedir) + +LIBIO_INCLUDES = @BUILD_LIBIO_INCLUDE@ -I$(top_srcdir)/libio + +CSHADOW_INCLUDES = @CSHADOWFLAGS@ @CSHADOW_INCLUDES@ + +CONFIG_INCLUDES = \ + -I$(top_srcdir)/@cpu_include_dir@ \ + -I$(top_srcdir)/@ctype_include_dir@ + +INCLUDES = \ + -D_GNU_SOURCE -nostdinc++ -I$(top_srcdir) \ + $(LIBIO_INCLUDES) $(CONFIG_INCLUDES) $(CSHADOW_INCLUDES) \ + $(TOPLEVEL_INCLUDES) + noinst_LTLIBRARIES = libio.la LINK = $(LIBTOOL) --mode=link "$(CCLD)" $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ -includes = +#includes = libio_headers = \ libio.h libioP.h iolibio.h @@ -39,35 +55,17 @@ else LIBIO_SRCS = endif -EXTRA_DIST = iostreamP.h - -libio_la_LIBADD = $(LIBIO_SRCS) -libio_la_DEPENDENCIES = $(libio_la_LIBADD) -libio_la_SOURCES = $(LIBIO_SRCS) - -if GLIBCPP_NEED_LIBIO_CONFIG_H -LIBIO_CONFIG_H = _G_config.h +if GLIBCPP_NEED_WLIBIO +LIBIO_WSRCS = \ + iofwide.c wfiledoalloc.c wfileops.c wgenops.c else -LIBIO_CONFIG_H = +LIBIO_WSRCS = endif -# Specify that *.o depend on this one header -$(libio_la_OBJECTS): $(LIBIO_CONFIG_H) - -# Generate this file. -_G_config.h: $(srcdir)/gen-params - rootme=`pwd`/ ; export rootme; \ - CC="$(CC) $(CINCLUDES)"; export CC; \ - CXX="$(CXX) $(CXXINCLUDES) $(NOSTDINC) $(CXXFLAGS)"; export CXX; \ - CONFIG_NM="$(NM)"; export CONFIG_NM; \ - $(SHELL) $(srcdir)/gen-params LIB_VERSION=$(VERSION) $(G_CONFIG_ARGS) >tmp-params.h - mv tmp-params.h _G_config.h - - - - - - +EXTRA_DIST = iostreamP.h +libio_la_LIBADD = $(LIBIO_SRCS) $(LIBIO_WSRCS) +libio_la_DEPENDENCIES = $(libio_la_LIBADD) +libio_la_SOURCES = $(LIBIO_SRCS) $(LIBIO_WSRCS) diff --git a/libstdc++-v3/libio/Makefile.in b/libstdc++-v3/libio/Makefile.in index 37c285295549..9e298dd3477f 100644 --- a/libstdc++-v3/libio/Makefile.in +++ b/libstdc++-v3/libio/Makefile.in @@ -70,7 +70,6 @@ CC = @CC@ CPP = @CPP@ CPU_FLAGS = @CPU_FLAGS@ CSHADOWFLAGS = @CSHADOWFLAGS@ -CSHADOW_INCLUDES = @CSHADOW_INCLUDES@ CSTDIO_CC = @CSTDIO_CC@ CSTDIO_H = @CSTDIO_H@ CXX = @CXX@ @@ -109,11 +108,29 @@ libinst_wstring_la = @libinst_wstring_la@ AUTOMAKE_OPTIONS = 1.3 cygnus +# Passed down for cross compilers, canadian crosses. +TOPLEVEL_INCLUDES = -I$(includedir) + +LIBIO_INCLUDES = @BUILD_LIBIO_INCLUDE@ -I$(top_srcdir)/libio + +CSHADOW_INCLUDES = @CSHADOWFLAGS@ @CSHADOW_INCLUDES@ + +CONFIG_INCLUDES = \ + -I$(top_srcdir)/@cpu_include_dir@ \ + -I$(top_srcdir)/@ctype_include_dir@ + + +INCLUDES = \ + -D_GNU_SOURCE -nostdinc++ -I$(top_srcdir) \ + $(LIBIO_INCLUDES) $(CONFIG_INCLUDES) $(CSHADOW_INCLUDES) \ + $(TOPLEVEL_INCLUDES) + + noinst_LTLIBRARIES = libio.la LINK = $(LIBTOOL) --mode=link "$(CCLD)" $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ -includes = +#includes = libio_headers = \ libio.h libioP.h iolibio.h @@ -121,14 +138,15 @@ libio_headers = \ @GLIBCPP_NEED_LIBIO_TRUE@LIBIO_SRCS = @GLIBCPP_NEED_LIBIO_TRUE@\ @GLIBCPP_NEED_LIBIO_TRUE@ filedoalloc.c genops.c fileops.c stdfiles.c cleanup.c @GLIBCPP_NEED_LIBIO_FALSE@LIBIO_SRCS = +@GLIBCPP_NEED_WLIBIO_TRUE@LIBIO_WSRCS = @GLIBCPP_NEED_WLIBIO_TRUE@\ +@GLIBCPP_NEED_WLIBIO_TRUE@ iofwide.c wfiledoalloc.c wfileops.c wgenops.c +@GLIBCPP_NEED_WLIBIO_FALSE@LIBIO_WSRCS = EXTRA_DIST = iostreamP.h -libio_la_LIBADD = $(LIBIO_SRCS) +libio_la_LIBADD = $(LIBIO_SRCS) $(LIBIO_WSRCS) libio_la_DEPENDENCIES = $(libio_la_LIBADD) -libio_la_SOURCES = $(LIBIO_SRCS) -@GLIBCPP_NEED_LIBIO_CONFIG_H_TRUE@LIBIO_CONFIG_H = @GLIBCPP_NEED_LIBIO_CONFIG_H_TRUE@_G_config.h -@GLIBCPP_NEED_LIBIO_CONFIG_H_FALSE@LIBIO_CONFIG_H = +libio_la_SOURCES = $(LIBIO_SRCS) $(LIBIO_WSRCS) mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs CONFIG_HEADER = ../config.h CONFIG_CLEAN_FILES = @@ -140,9 +158,27 @@ CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ libio_la_LDFLAGS = -@GLIBCPP_NEED_LIBIO_TRUE@libio_la_OBJECTS = filedoalloc.lo genops.lo \ -@GLIBCPP_NEED_LIBIO_TRUE@fileops.lo stdfiles.lo cleanup.lo -@GLIBCPP_NEED_LIBIO_FALSE@libio_la_OBJECTS = +@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@libio_la_OBJECTS = \ +@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@filedoalloc.lo \ +@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@genops.lo fileops.lo \ +@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@stdfiles.lo \ +@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@cleanup.lo \ +@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@iofwide.lo \ +@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@wfiledoalloc.lo \ +@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@wfileops.lo \ +@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@wgenops.lo +@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@libio_la_OBJECTS = \ +@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@iofwide.lo \ +@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@wfiledoalloc.lo \ +@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@wfileops.lo \ +@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@wgenops.lo +@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@libio_la_OBJECTS = \ +@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@filedoalloc.lo \ +@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@genops.lo \ +@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@fileops.lo \ +@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@stdfiles.lo \ +@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@cleanup.lo +@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_FALSE@libio_la_OBJECTS = CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -339,18 +375,6 @@ installdirs mostlyclean-generic distclean-generic clean-generic \ maintainer-clean-generic clean mostlyclean distclean maintainer-clean -# Specify that *.o depend on this one header -$(libio_la_OBJECTS): $(LIBIO_CONFIG_H) - -# Generate this file. -_G_config.h: $(srcdir)/gen-params - rootme=`pwd`/ ; export rootme; \ - CC="$(CC) $(CINCLUDES)"; export CC; \ - CXX="$(CXX) $(CXXINCLUDES) $(NOSTDINC) $(CXXFLAGS)"; export CXX; \ - CONFIG_NM="$(NM)"; export CONFIG_NM; \ - $(SHELL) $(srcdir)/gen-params LIB_VERSION=$(VERSION) $(G_CONFIG_ARGS) >tmp-params.h - mv tmp-params.h _G_config.h - # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/libstdc++-v3/libio/_G_config.h b/libstdc++-v3/libio/_G_config.h new file mode 100644 index 000000000000..a35d9f49aca0 --- /dev/null +++ b/libstdc++-v3/libio/_G_config.h @@ -0,0 +1,130 @@ +/* This file is needed by libio to define various configuration parameters. + These are always the same in the GNU C library. */ + +#ifndef _G_config_h +#define _G_config_h 1 + +#ifndef _LIBC +# include +#endif + +/* Define types for libio in terms of the standard internal type names. */ + +#include +#define __need_size_t +#define __need_wchar_t +#define __need_wint_t +#define __need_NULL +#include + + +/* For use as part of glibc (native) or as part of libstdc++ (maybe + not glibc) */ +#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 1) +# ifdef _GLIBCPP_USE_WCHAR_T +# include +typedef mbstate_t __mbstate_t; +# endif +#endif + +#ifndef _WINT_T +/* Integral type unchanged by default argument promotions that can + hold any value corresponding to members of the extended character + set, as well as at least one value that does not correspond to any + member of the extended character set. */ +# define _WINT_T +typedef unsigned int wint_t; +#endif +#define __need_mbstate_t +#include +#define _G_size_t size_t +#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T +typedef struct +{ + __off_t __pos; + __mbstate_t __state; +} _G_fpos_t; +typedef struct +{ + __off64_t __pos; + __mbstate_t __state; +} _G_fpos64_t; +#else +typedef __off_t _G_fpos_t; +typedef __off64_t _G_fpos64_t; +#endif +#define _G_ssize_t __ssize_t +#define _G_off_t __off_t +#define _G_off64_t __off64_t +#define _G_pid_t __pid_t +#define _G_uid_t __uid_t +#define _G_wchar_t wchar_t +#define _G_wint_t wint_t +#define _G_stat64 stat64 +#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T +# include +typedef iconv_t _G_iconv_t; +# if 0 +/* XXX Commented out because outside glibc we have to use iconv() + and not gconv(). */ +typedef union +{ + struct __gconv_info __cd; + struct + { + struct __gconv_info __cd; + struct __gconv_step_data __data; + } __combined; +} _G_iconv_t; +# endif +#endif + +typedef int _G_int16_t __attribute__ ((__mode__ (__HI__))); +typedef int _G_int32_t __attribute__ ((__mode__ (__SI__))); +typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__))); +typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__))); + +#define _G_HAVE_BOOL 1 + + +/* These library features are always available in the GNU C library. */ +#define _G_HAVE_ATEXIT 1 +#define _G_HAVE_SYS_CDEFS 1 +#define _G_HAVE_SYS_WAIT 1 +#define _G_NEED_STDARG_H 1 +#define _G_va_list __gnuc_va_list + +#define _G_HAVE_PRINTF_FP 1 +#define _G_HAVE_MMAP 1 +#define _G_HAVE_LONG_DOUBLE_IO 1 +#define _G_HAVE_IO_FILE_OPEN 1 +#define _G_HAVE_IO_GETLINE_INFO 1 + +#define _G_IO_IO_FILE_VERSION 0x20001 + +//#define _G_OPEN64 __open64 +//#define _G_LSEEK64 __lseek64 +//#define _G_FSTAT64(fd,buf) __fxstat64 (_STAT_VER, fd, buf) + +/* This is defined by if `st_blksize' exists. */ +#define _G_HAVE_ST_BLKSIZE defined (_STATBUF_ST_BLKSIZE) + +#define _G_BUFSIZ 8192 + +/* These are the vtbl details for ELF. */ +#define _G_NAMES_HAVE_UNDERSCORE 0 +#define _G_VTABLE_LABEL_HAS_LENGTH 1 +#define _G_USING_THUNKS 1 +#define _G_VTABLE_LABEL_PREFIX "__vt_" +#define _G_VTABLE_LABEL_PREFIX_ID __vt_ + +#define _G_INTERNAL_CCS "UCS4" + + +#if defined __cplusplus || defined __STDC__ +# define _G_ARGS(ARGLIST) ARGLIST +#else +# define _G_ARGS(ARGLIST) () +#endif + +#endif /* _G_config.h */ diff --git a/libstdc++-v3/libio/filedoalloc.c b/libstdc++-v3/libio/filedoalloc.c index a27455c4a5cb..6abab602d167 100644 --- a/libstdc++-v3/libio/filedoalloc.c +++ b/libstdc++-v3/libio/filedoalloc.c @@ -27,34 +27,24 @@ * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. [rescinded 22 July 1999] - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. + * Redistribution and use in source and binary forms are permitted + * provided that the above copyright notice and this paragraph are + * duplicated in all such forms and that any documentation, + * advertising materials, and other materials related to such + * distribution and use acknowledge that the software was developed + * by the University of California, Berkeley. The name of the + * University may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ /* Modified for GNU iostream by Per Bothner 1991, 1992. */ +#ifndef _POSIX_SOURCE +# define _POSIX_SOURCE +#endif #include "libioP.h" #include #include @@ -83,9 +73,9 @@ _IO_file_doallocate (fp) _IO_size_t size; int couldbetty; char *p; - struct stat st; + struct _G_stat64 st; -#if !defined(_LIBC) && !defined(__linux__) +#ifndef _LIBC /* If _IO_cleanup_registration_needed is non-zero, we should call the function it points to. This is to make sure _IO_cleanup gets called on exit. We call it from _IO_file_doallocate, since that is likely diff --git a/libstdc++-v3/libio/fileops.c b/libstdc++-v3/libio/fileops.c index bd93f2f68aa9..122203e38bff 100644 --- a/libstdc++-v3/libio/fileops.c +++ b/libstdc++-v3/libio/fileops.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1997-1999, 2000 Free Software Foundation, Inc. This file is part of the GNU IO Library. Written by Per Bothner . @@ -25,25 +25,50 @@ General Public License. */ +#ifndef _POSIX_SOURCE +# define _POSIX_SOURCE +#endif #include "libioP.h" #include #include #include #include -#include #include +#ifdef __STDC__ +#include +#endif +#if _LIBC +# include "../wcsmbs/wcsmbsload.h" +# include +#endif #ifndef errno extern int errno; #endif +#ifndef __set_errno +# define __set_errno(Val) errno = (Val) +#endif #ifdef _LIBC # define open(Name, Flags, Prot) __open (Name, Flags, Prot) # define close(FD) __close (FD) -# define fstat(FD, Statbuf) __fstat (FD, Statbuf) # define lseek(FD, Offset, Whence) __lseek (FD, Offset, Whence) # define read(FD, Buf, NBytes) __read (FD, Buf, NBytes) # define write(FD, Buf, NBytes) __write (FD, Buf, NBytes) +#else +# define _IO_new_do_write _IO_do_write +# define _IO_new_file_attach _IO_file_attach +# define _IO_new_file_close_it _IO_file_close_it +# define _IO_new_file_finish _IO_file_finish +# define _IO_new_file_fopen _IO_file_fopen +# define _IO_new_file_init _IO_file_init +# define _IO_new_file_setbuf _IO_file_setbuf +# define _IO_new_file_sync _IO_file_sync +# define _IO_new_file_overflow _IO_file_overflow +# define _IO_new_file_seekoff _IO_file_seekoff +# define _IO_new_file_underflow _IO_file_underflow +# define _IO_new_file_write _IO_file_write +# define _IO_new_file_xsputn _IO_file_xsputn #endif /* An fstream can be in at most one of put mode, get mode, or putback mode. @@ -101,21 +126,21 @@ extern int errno; void -_IO_file_init (fp) - _IO_FILE *fp; +_IO_new_file_init (fp) + struct _IO_FILE_plus *fp; { /* POSIX.1 allows another file handle to be used to change the position of our file descriptor. Hence we actually don't know the actual position before we do the first fseek (and until a following fflush). */ - fp->_offset = _IO_pos_BAD; - fp->_IO_file_flags |= CLOSED_FILEBUF_FLAGS; + fp->file._offset = _IO_pos_BAD; + fp->file._IO_file_flags |= CLOSED_FILEBUF_FLAGS; - _IO_link_in(fp); - fp->_fileno = -1; + _IO_link_in (fp); + fp->file._fileno = -1; } int -_IO_file_close_it (fp) +_IO_new_file_close_it (fp) _IO_FILE *fp; { int write_status, close_status; @@ -129,20 +154,31 @@ _IO_file_close_it (fp) close_status = _IO_SYSCLOSE (fp); /* Free buffer. */ - _IO_setb (fp, NULL, NULL, 0); - _IO_setg (fp, NULL, NULL, NULL); - _IO_setp (fp, NULL, NULL); + if (fp->_mode <= 0) + { + _IO_setb (fp, NULL, NULL, 0); + _IO_setg (fp, NULL, NULL, NULL); + _IO_setp (fp, NULL, NULL); + } +#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T + else + { + _IO_wsetb (fp, NULL, NULL, 0); + _IO_wsetg (fp, NULL, NULL, NULL); + _IO_wsetp (fp, NULL, NULL); + } +#endif - _IO_un_link (fp); + _IO_un_link ((struct _IO_FILE_plus *) fp); fp->_flags = _IO_MAGIC|CLOSED_FILEBUF_FLAGS; - fp->_fileno = EOF; + fp->_fileno = -1; fp->_offset = _IO_pos_BAD; return close_status ? close_status : write_status; } void -_IO_file_finish (fp, dummy) +_IO_new_file_finish (fp, dummy) _IO_FILE *fp; int dummy; { @@ -155,27 +191,57 @@ _IO_file_finish (fp, dummy) _IO_default_finish (fp, 0); } -#if _G_IO_IO_FILE_VERSION == 0x20001 -_IO_FILE * -_IO_file_fopen (fp, filename, mode, some_int) - _IO_FILE *fp; - const char *filename; - const char *mode; - int some_int; -#else -_IO_FILE * -_IO_file_fopen (fp, filename, mode) - _IO_FILE *fp; - const char *filename; - const char *mode; +#if defined __GNUC__ && __GNUC__ >= 2 +__inline__ #endif +_IO_FILE * +_IO_file_open (fp, filename, posix_mode, prot, read_write, is32not64) + _IO_FILE *fp; + const char *filename; + int posix_mode; + int prot; + int read_write; + int is32not64; +{ + int fdesc; +#ifdef _G_OPEN64 + fdesc = (is32not64 + ? open (filename, posix_mode, prot) + : _G_OPEN64 (filename, posix_mode, prot)); +#else + fdesc = open (filename, posix_mode, prot); +#endif + if (fdesc < 0) + return NULL; + fp->_fileno = fdesc; + _IO_mask_flags (fp, read_write,_IO_NO_READS+_IO_NO_WRITES+_IO_IS_APPENDING); + if (read_write & _IO_IS_APPENDING) + if (_IO_SEEKOFF (fp, (_IO_off64_t)0, _IO_seek_end, _IOS_INPUT|_IOS_OUTPUT) + == _IO_pos_BAD && errno != ESPIPE) + return NULL; + _IO_link_in ((struct _IO_FILE_plus *) fp); + return fp; +} + +_IO_FILE * +_IO_new_file_fopen (fp, filename, mode, is32not64) + _IO_FILE *fp; + const char *filename; + const char *mode; + int is32not64; { int oflags = 0, omode; - int read_write, fdesc; + int read_write; int oprot = 0666; + int i; + _IO_FILE *result; +#if _LIBC + const char *cs; +#endif + if (_IO_file_is_open (fp)) return 0; - switch (*mode++) + switch (*mode) { case 'r': omode = O_RDONLY; @@ -195,26 +261,81 @@ _IO_file_fopen (fp, filename, mode) __set_errno (EINVAL); return NULL; } - if (mode[0] == '+' || (mode[0] == 'b' && mode[1] == '+')) + for (i = 1; i < 4; ++i) { - omode = O_RDWR; - read_write &= _IO_IS_APPENDING; + switch (*++mode) + { + case '\0': + break; + case '+': + omode = O_RDWR; + read_write &= _IO_IS_APPENDING; + continue; + case 'x': + oflags |= O_EXCL; + continue; + case 'b': + default: + /* Ignore. */ + continue; + } + break; } - fdesc = open (filename, omode|oflags, oprot); - if (fdesc < 0) - return NULL; - fp->_fileno = fdesc; - _IO_mask_flags (fp, read_write,_IO_NO_READS+_IO_NO_WRITES+_IO_IS_APPENDING); - if (read_write & _IO_IS_APPENDING) - if (_IO_SEEKOFF (fp, (_IO_off_t)0, _IO_seek_end, _IOS_INPUT|_IOS_OUTPUT) - == _IO_pos_BAD && errno != ESPIPE) - return NULL; - _IO_link_in (fp); - return fp; + + result = _IO_file_open (fp, filename, omode|oflags, oprot, read_write, + is32not64); + + +#if _LIBC + /* Test whether the mode string specifies the conversion. */ + cs = strstr (mode, ",ccs="); + if (cs != NULL) + { + /* Yep. Load the appropriate conversions and set the orientation + to wide. */ + struct gconv_fcts fcts; + struct _IO_codecvt *cc; + + if (! _IO_CHECK_WIDE (fp) || __wcsmbs_named_conv (&fcts, cs + 5) != 0) + { + /* Something went wrong, we cannot load the conversion modules. + This means we cannot proceed since the user explicitly asked + for these. */ + _IO_new_fclose (result); + return NULL; + } + + cc = &fp->_wide_data->_codecvt; + + /* The functions are always the same. */ + *cc = __libio_codecvt; + + cc->__cd_in.__cd.__nsteps = 1; /* Only one step allowed. */ + cc->__cd_in.__cd.__steps = fcts.towc; + + cc->__cd_in.__cd.__data[0].__invocation_counter = 0; + cc->__cd_in.__cd.__data[0].__internal_use = 1; + cc->__cd_in.__cd.__data[0].__flags = __GCONV_IS_LAST; + cc->__cd_in.__cd.__data[0].__statep = &result->_wide_data->_IO_state; + + cc->__cd_out.__cd.__nsteps = 1; /* Only one step allowed. */ + cc->__cd_out.__cd.__steps = fcts.tomb; + + cc->__cd_out.__cd.__data[0].__invocation_counter = 0; + cc->__cd_out.__cd.__data[0].__internal_use = 1; + cc->__cd_out.__cd.__data[0].__flags = __GCONV_IS_LAST; + cc->__cd_out.__cd.__data[0].__statep = &result->_wide_data->_IO_state; + + /* Set the mode now. */ + result->_mode = 1; + } +#endif /* GNU libc */ + + return result; } _IO_FILE * -_IO_file_attach (fp, fd) +_IO_new_file_attach (fp, fd) _IO_FILE *fp; int fd; { @@ -226,67 +347,79 @@ _IO_file_attach (fp, fd) /* Get the current position of the file. */ /* We have to do that since that may be junk. */ fp->_offset = _IO_pos_BAD; - if (_IO_SEEKOFF (fp, (_IO_off_t)0, _IO_seek_cur, _IOS_INPUT|_IOS_OUTPUT) + if (_IO_SEEKOFF (fp, (_IO_off64_t)0, _IO_seek_cur, _IOS_INPUT|_IOS_OUTPUT) == _IO_pos_BAD && errno != ESPIPE) return NULL; return fp; } _IO_FILE * -_IO_file_setbuf (fp, p, len) +_IO_new_file_setbuf (fp, p, len) _IO_FILE *fp; char *p; _IO_ssize_t len; { - if (_IO_default_setbuf (fp, p, len) == NULL) - return NULL; + if (_IO_default_setbuf (fp, p, len) == NULL) + return NULL; - fp->_IO_write_base = fp->_IO_write_ptr = fp->_IO_write_end - = fp->_IO_buf_base; - _IO_setg (fp, fp->_IO_buf_base, fp->_IO_buf_base, fp->_IO_buf_base); + fp->_IO_write_base = fp->_IO_write_ptr = fp->_IO_write_end + = fp->_IO_buf_base; + _IO_setg (fp, fp->_IO_buf_base, fp->_IO_buf_base, fp->_IO_buf_base); - return fp; + return fp; } +static int new_do_write __P ((_IO_FILE *, const char *, _IO_size_t)); + /* Write TO_DO bytes from DATA to FP. Then mark FP as having empty buffers. */ int -_IO_do_write (fp, data, to_do) +_IO_new_do_write (fp, data, to_do) + _IO_FILE *fp; + const char *data; + _IO_size_t to_do; +{ + return (to_do == 0 || new_do_write (fp, data, to_do) == to_do) + ? 0 : EOF; +} + +static +int +new_do_write (fp, data, to_do) _IO_FILE *fp; const char *data; _IO_size_t to_do; { _IO_size_t count; - if (to_do == 0) - return 0; if (fp->_flags & _IO_IS_APPENDING) /* On a system without a proper O_APPEND implementation, - you would need to sys_seek(0, SEEK_END) here, but it + you would need to sys_seek(0, SEEK_END) here, but is is not needed nor desirable for Unix- or Posix-like systems. Instead, just indicate that offset (before and after) is unpredictable. */ fp->_offset = _IO_pos_BAD; else if (fp->_IO_read_end != fp->_IO_write_base) { - _IO_pos_t new_pos + _IO_off64_t new_pos = _IO_SYSSEEK (fp, fp->_IO_write_base - fp->_IO_read_end, 1); if (new_pos == _IO_pos_BAD) - return EOF; + return 0; fp->_offset = new_pos; } count = _IO_SYSWRITE (fp, data, to_do); - if (fp->_cur_column) - fp->_cur_column = _IO_adjust_column (fp->_cur_column - 1, data, to_do) + 1; + if (fp->_cur_column && count) + fp->_cur_column = _IO_adjust_column (fp->_cur_column - 1, data, count) + 1; _IO_setg (fp, fp->_IO_buf_base, fp->_IO_buf_base, fp->_IO_buf_base); fp->_IO_write_base = fp->_IO_write_ptr = fp->_IO_buf_base; - fp->_IO_write_end = ((fp->_flags & (_IO_LINE_BUF+_IO_UNBUFFERED)) + fp->_IO_write_end = (fp->_mode < 0 + && (fp->_flags & (_IO_LINE_BUF+_IO_UNBUFFERED)) ? fp->_IO_buf_base : fp->_IO_buf_end); - return count != to_do ? EOF : 0; + return count; } int -_IO_file_underflow (fp) +_IO_new_file_underflow (fp) _IO_FILE *fp; { _IO_ssize_t count; @@ -298,6 +431,7 @@ _IO_file_underflow (fp) if (fp->_flags & _IO_NO_READS) { + fp->_flags |= _IO_ERR_SEEN; __set_errno (EBADF); return EOF; } @@ -305,7 +439,15 @@ _IO_file_underflow (fp) return *(unsigned char *) fp->_IO_read_ptr; if (fp->_IO_buf_base == NULL) - _IO_doallocbuf (fp); + { + /* Maybe we already have a push back pointer. */ + if (fp->_IO_save_base != NULL) + { + free (fp->_IO_save_base); + fp->_flags &= ~_IO_IN_BACKUP; + } + _IO_doallocbuf (fp); + } /* Flush all line buffered files before reading. */ /* FIXME This can/should be moved to genops ?? */ @@ -341,7 +483,7 @@ _IO_file_underflow (fp) } int -_IO_file_overflow (f, ch) +_IO_new_file_overflow (f, ch) _IO_FILE *f; int ch; { @@ -352,7 +494,7 @@ _IO_file_overflow (f, ch) return EOF; } /* If currently reading or no buffer allocated. */ - if ((f->_flags & _IO_CURRENTLY_PUTTING) == 0) + if ((f->_flags & _IO_CURRENTLY_PUTTING) == 0 || f->_IO_write_base == 0) { /* Allocate a buffer if needed. */ if (f->_IO_write_base == 0) @@ -374,32 +516,32 @@ _IO_file_overflow (f, ch) f->_IO_write_end = f->_IO_buf_end; f->_IO_read_base = f->_IO_read_ptr = f->_IO_read_end; - if (f->_flags & (_IO_LINE_BUF+_IO_UNBUFFERED)) - f->_IO_write_end = f->_IO_write_ptr; f->_flags |= _IO_CURRENTLY_PUTTING; + if (f->_mode < 0 && f->_flags & (_IO_LINE_BUF+_IO_UNBUFFERED)) + f->_IO_write_end = f->_IO_write_ptr; } if (ch == EOF) - return _IO_do_flush (f); + return _IO_new_do_write(f, f->_IO_write_base, + f->_IO_write_ptr - f->_IO_write_base); if (f->_IO_write_ptr == f->_IO_buf_end ) /* Buffer is really full */ if (_IO_do_flush (f) == EOF) return EOF; *f->_IO_write_ptr++ = ch; if ((f->_flags & _IO_UNBUFFERED) || ((f->_flags & _IO_LINE_BUF) && ch == '\n')) - if (_IO_do_flush (f) == EOF) + if (_IO_new_do_write(f, f->_IO_write_base, + f->_IO_write_ptr - f->_IO_write_base) == EOF) return EOF; return (unsigned char) ch; } int -_IO_file_sync (fp) +_IO_new_file_sync (fp) _IO_FILE *fp; { - _IO_size_t delta; + _IO_ssize_t delta; int retval = 0; - _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp); - _IO_flockfile (fp); /* char* ptr = cur_ptr(); */ if (fp->_IO_write_ptr > fp->_IO_write_base) if (_IO_do_flush(fp)) return EOF; @@ -410,8 +552,8 @@ _IO_file_sync (fp) if (_IO_in_backup (fp)) delta -= eGptr () - Gbase (); #endif - _IO_off_t new_pos = _IO_SYSSEEK (fp, delta, 1); - if (new_pos != (_IO_off_t) EOF) + _IO_off64_t new_pos = _IO_SYSSEEK (fp, delta, 1); + if (new_pos != (_IO_off64_t) EOF) fp->_IO_read_end = fp->_IO_read_ptr; #ifdef ESPIPE else if (errno == ESPIPE) @@ -424,28 +566,18 @@ _IO_file_sync (fp) fp->_offset = _IO_pos_BAD; /* FIXME: Cleanup - can this be shared? */ /* setg(base(), ptr, ptr); */ - _IO_cleanup_region_end (1); return retval; } -#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001 _IO_off64_t -_IO_file_seekoff (fp, offset, dir, mode) +_IO_new_file_seekoff (fp, offset, dir, mode) _IO_FILE *fp; _IO_off64_t offset; int dir; int mode; -#else -_IO_off_t -_IO_file_seekoff (fp, offset, dir, mode) - _IO_FILE *fp; - _IO_off_t offset; - int dir; - int mode; -#endif { - _IO_pos_t result; - _IO_off_t delta, new_offset; + _IO_off64_t result; + _IO_off64_t delta, new_offset; long count; /* POSIX.1 8.2.3.7 says that after a call the fflush() the file offset of the underlying file must be exact. */ @@ -469,6 +601,12 @@ _IO_file_seekoff (fp, offset, dir, mode) if (fp->_IO_buf_base == NULL) { + /* It could be that we already have a pushback buffer. */ + if (fp->_IO_read_base != NULL) + { + free (fp->_IO_read_base); + fp->_flags &= ~_IO_IN_BACKUP; + } _IO_doallocbuf (fp); _IO_setp (fp, fp->_IO_buf_base, fp->_IO_buf_base); _IO_setg (fp, fp->_IO_buf_base, fp->_IO_buf_base, fp->_IO_buf_base); @@ -482,7 +620,7 @@ _IO_file_seekoff (fp, offset, dir, mode) if (fp->_offset == _IO_pos_BAD) goto dumb; /* Make offset absolute, assuming current pointer is file_ptr(). */ - offset += _IO_pos_as_off (fp->_offset); + offset += fp->_offset; dir = _IO_seek_set; break; @@ -490,7 +628,7 @@ _IO_file_seekoff (fp, offset, dir, mode) break; case _IO_seek_end: { - struct stat st; + struct _G_stat64 st; if (_IO_SYSSTAT (fp, &st) == 0 && S_ISREG (st.st_mode)) { offset += st.st_size; @@ -502,13 +640,17 @@ _IO_file_seekoff (fp, offset, dir, mode) } /* At this point, dir==_IO_seek_set. */ + /* If we are only interested in the current position we've found it now. */ + if (mode == 0) + return offset; + /* If destination is within current buffer, optimize: */ if (fp->_offset != _IO_pos_BAD && fp->_IO_read_base != NULL && !_IO_in_backup (fp)) { /* Offset relative to start of main get area. */ - _IO_pos_t rel_offset = (offset - fp->_offset - + (fp->_IO_read_end - fp->_IO_read_base)); + _IO_off64_t rel_offset = (offset - fp->_offset + + (fp->_IO_read_end - fp->_IO_read_base)); if (rel_offset >= 0) { #if 0 @@ -520,7 +662,10 @@ _IO_file_seekoff (fp, offset, dir, mode) _IO_setg (fp, fp->_IO_buf_base, fp->_IO_buf_base + rel_offset, fp->_IO_read_end); _IO_setp (fp, fp->_IO_buf_base, fp->_IO_buf_base); - return offset; + { + _IO_mask_flags (fp, 0, _IO_EOF_SEEN); + goto resync; + } } #ifdef TODO /* If we have streammarkers, seek forward by reading ahead. */ @@ -530,7 +675,8 @@ _IO_file_seekoff (fp, offset, dir, mode) - (fp->_IO_read_ptr - fp->_IO_read_base); if (ignore (to_skip) != to_skip) goto dumb; - return offset; + _IO_mask_flags (fp, 0, _IO_EOF_SEEN); + goto resync; } #endif } @@ -540,7 +686,8 @@ _IO_file_seekoff (fp, offset, dir, mode) if (!_IO_in_backup (fp)) _IO_switch_to_backup_area (fp); gbump (fp->_IO_read_end + rel_offset - fp->_IO_read_ptr); - return offset; + _IO_mask_flags (fp, 0, _IO_EOF_SEEN); + goto resync; } #endif } @@ -589,11 +736,23 @@ _IO_file_seekoff (fp, offset, dir, mode) _IO_unsave_markers (fp); result = _IO_SYSSEEK (fp, offset, dir); if (result != EOF) - _IO_mask_flags (fp, 0, _IO_EOF_SEEN); - fp->_offset = result; - _IO_setg (fp, fp->_IO_buf_base, fp->_IO_buf_base, fp->_IO_buf_base); - _IO_setp (fp, fp->_IO_buf_base, fp->_IO_buf_base); + { + _IO_mask_flags (fp, 0, _IO_EOF_SEEN); + fp->_offset = result; + _IO_setg (fp, fp->_IO_buf_base, fp->_IO_buf_base, fp->_IO_buf_base); + _IO_setp (fp, fp->_IO_buf_base, fp->_IO_buf_base); + } return result; + +resync: + /* We need to do it since it is possible that the file offset in + the kernel may be changed behind our back. It may happen when + we fopen a file and then do a fork. One process may access the + the file and the kernel file offset will be changed. */ + if (fp->_offset >= 0) + _IO_SYSSEEK (fp, fp->_offset, 0); + + return offset; } _IO_ssize_t @@ -605,21 +764,17 @@ _IO_file_read (fp, buf, size) return read (fp->_fileno, buf, size); } -#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001 _IO_off64_t _IO_file_seek (fp, offset, dir) _IO_FILE *fp; _IO_off64_t offset; int dir; -#else -_IO_off_t -_IO_file_seek (fp, offset, dir) - _IO_FILE *fp; - _IO_off_t offset; - int dir; -#endif { +#ifdef _G_LSEEK64 + return _G_LSEEK64 (fp->_fileno, offset, dir); +#else return lseek (fp->_fileno, offset, dir); +#endif } int @@ -627,7 +782,11 @@ _IO_file_stat (fp, st) _IO_FILE *fp; void *st; { +#ifdef _G_FSTAT64 + return _G_FSTAT64 (fp->_fileno, (struct _G_stat64 *) st); +#else return fstat (fp->_fileno, (struct stat *) st); +#endif } int @@ -638,7 +797,7 @@ _IO_file_close (fp) } _IO_ssize_t -_IO_file_write (f, data, n) +_IO_new_file_write (f, data, n) _IO_FILE *f; const void *data; _IO_ssize_t n; @@ -647,7 +806,7 @@ _IO_file_write (f, data, n) while (to_do > 0) { _IO_ssize_t count = write (f->_fileno, data, to_do); - if (count == EOF) + if (count < 0) { f->_flags |= _IO_ERR_SEEN; break; @@ -662,12 +821,12 @@ _IO_file_write (f, data, n) } _IO_size_t -_IO_file_xsputn (f, data, n) +_IO_new_file_xsputn (f, data, n) _IO_FILE *f; const void *data; _IO_size_t n; { - register const char *s = (char *) data; + register const char *s = (const char *) data; _IO_size_t to_do = n; int must_flush = 0; _IO_size_t count; @@ -704,7 +863,12 @@ _IO_file_xsputn (f, data, n) count = to_do; if (count > 20) { +#ifdef _LIBC + f->_IO_write_ptr = __mempcpy (f->_IO_write_ptr, s, count); +#else memcpy (f->_IO_write_ptr, s, count); + f->_IO_write_ptr += count; +#endif s += count; } else @@ -713,125 +877,174 @@ _IO_file_xsputn (f, data, n) register int i = (int) count; while (--i >= 0) *p++ = *s++; + f->_IO_write_ptr = p; } - f->_IO_write_ptr += count; to_do -= count; } if (to_do + must_flush > 0) { - _IO_size_t block_size, dont_write; + _IO_size_t block_size, do_write; /* Next flush the (full) buffer. */ - if (__overflow (f, EOF) == EOF) + if (_IO_OVERFLOW (f, EOF) == EOF) return n - to_do; /* Try to maintain alignment: write a whole number of blocks. dont_write is what gets left over. */ block_size = f->_IO_buf_end - f->_IO_buf_base; - dont_write = block_size >= 128 ? to_do % block_size : 0; + do_write = to_do - (block_size >= 128 ? to_do % block_size : 0); - count = to_do - dont_write; - if (_IO_do_write (f, s, count) == EOF) - return n - to_do; - to_do = dont_write; + if (do_write) + { + count = new_do_write (f, s, do_write); + to_do -= count; + if (count < do_write) + return n - to_do; + } /* Now write out the remainder. Normally, this will fit in the buffer, but it's somewhat messier for line-buffered files, so we let _IO_default_xsputn handle the general case. */ - if (dont_write) - to_do -= _IO_default_xsputn (f, s+count, dont_write); + if (to_do) + to_do -= _IO_default_xsputn (f, s+do_write, to_do); } return n - to_do; } -#if 0 -/* Work in progress */ _IO_size_t _IO_file_xsgetn (fp, data, n) _IO_FILE *fp; void *data; _IO_size_t n; { - register _IO_size_t more = n; + register _IO_size_t want, have; + register _IO_ssize_t count; register char *s = data; - for (;;) - { - /* Data available. */ - _IO_ssize_t count = fp->_IO_read_end - fp->_IO_read_ptr; - if (count > 0) - { - if (count > more) - count = more; - if (count > 20) - { - memcpy (s, fp->_IO_read_ptr, count); - s += count; - fp->_IO_read_ptr += count; - } - else if (count <= 0) - count = 0; - else - { - register char *p = fp->_IO_read_ptr; - register int i = (int) count; - while (--i >= 0) - *s++ = *p++; - fp->_IO_read_ptr = p; - } - more -= count; - } -#if 0 - if (! _IO_in put_mode (fp) - && ! _IO_have_markers (fp) && ! IO_have_backup (fp)) - { - /* This is an optimization of _IO_file_underflow */ - if (fp->_flags & _IO_NO_READS) - break; - /* If we're reading a lot of data, don't bother allocating - a buffer. But if we're only reading a bit, perhaps we should ??*/ - if (count <= 512 && fp->_IO_buf_base == NULL) - _IO_doallocbuf (fp); - if (fp->_flags & (_IO_LINE_BUF|_IO_UNBUFFERED)) - _IO_flush_all_linebuffered (); - _IO_switch_to_get_mode (fp); ???; - count = _IO_SYSREAD (fp, s, more); + want = n; + + if (fp->_IO_buf_base == NULL) + { + /* Maybe we already have a push back pointer. */ + if (fp->_IO_save_base != NULL) + { + free (fp->_IO_save_base); + fp->_flags &= ~_IO_IN_BACKUP; + } + _IO_doallocbuf (fp); + } + + while (want > 0) + { + have = fp->_IO_read_end - fp->_IO_read_ptr; + if (want <= have) + { + memcpy (s, fp->_IO_read_ptr, want); + fp->_IO_read_ptr += want; + want = 0; + } + else + { + if (have > 0) + { +#ifdef _LIBC + s = __mempcpy (s, fp->_IO_read_ptr, have); +#else + memcpy (s, fp->_IO_read_ptr, have); + s += have; +#endif + want -= have; + fp->_IO_read_ptr += have; + } + + /* Check for backup and repeat */ + if (_IO_in_backup (fp)) + { + _IO_switch_to_main_get_area (fp); + continue; + } + + /* If we now want less than a buffer, underflow and repeat + the copy. Otherwise, _IO_SYSREAD directly to + the user buffer. */ + if (fp->_IO_buf_base && want < fp->_IO_buf_end - fp->_IO_buf_base) + { + if (__underflow (fp) == EOF) + break; + + continue; + } + + /* These must be set before the sysread as we might longjmp out + waiting for input. */ + _IO_setg (fp, fp->_IO_buf_base, fp->_IO_buf_base, fp->_IO_buf_base); + _IO_setp (fp, fp->_IO_buf_base, fp->_IO_buf_base); + + /* Try to maintain alignment: read a whole number of blocks. */ + count = want; + if (fp->_IO_buf_base) + { + _IO_size_t block_size = fp->_IO_buf_end - fp->_IO_buf_base; + if (block_size >= 128) + count -= want % block_size; + } + + count = _IO_SYSREAD (fp, s, count); if (count <= 0) - { - if (count == 0) - fp->_flags |= _IO_EOF_SEEN; - else - fp->_flags |= _IO_ERR_SEEN, count = 0; - } + { + if (count == 0) + fp->_flags |= _IO_EOF_SEEN; + else + fp->_flags |= _IO_ERR_SEEN; + + break; + } s += count; - more -= count; + want -= count; + if (fp->_offset != _IO_pos_BAD) + _IO_pos_adjust (fp->_offset, count); } -#endif - if (more == 0 || __underflow (fp) == EOF) - break; } - return n - more; + + return n - want; } -#endif struct _IO_jump_t _IO_file_jumps = { JUMP_INIT_DUMMY, - JUMP_INIT(finish, _IO_file_finish), - JUMP_INIT(overflow, _IO_file_overflow), - JUMP_INIT(underflow, _IO_file_underflow), + JUMP_INIT(finish, _IO_new_file_finish), + JUMP_INIT(overflow, _IO_new_file_overflow), + JUMP_INIT(underflow, _IO_new_file_underflow), JUMP_INIT(uflow, _IO_default_uflow), JUMP_INIT(pbackfail, _IO_default_pbackfail), - JUMP_INIT(xsputn, _IO_file_xsputn), - JUMP_INIT(xsgetn, _IO_default_xsgetn), - JUMP_INIT(seekoff, _IO_file_seekoff), + JUMP_INIT(xsputn, _IO_new_file_xsputn), + JUMP_INIT(xsgetn, _IO_file_xsgetn), + JUMP_INIT(seekoff, _IO_new_file_seekoff), JUMP_INIT(seekpos, _IO_default_seekpos), - JUMP_INIT(setbuf, _IO_file_setbuf), - JUMP_INIT(sync, _IO_file_sync), + JUMP_INIT(setbuf, _IO_new_file_setbuf), + JUMP_INIT(sync, _IO_new_file_sync), JUMP_INIT(doallocate, _IO_file_doallocate), JUMP_INIT(read, _IO_file_read), - JUMP_INIT(write, _IO_file_write), + JUMP_INIT(write, _IO_new_file_write), JUMP_INIT(seek, _IO_file_seek), JUMP_INIT(close, _IO_file_close), - JUMP_INIT(stat, _IO_file_stat) + JUMP_INIT(stat, _IO_file_stat), + JUMP_INIT(showmanyc, _IO_default_showmanyc), + JUMP_INIT(imbue, _IO_default_imbue) }; + +#ifdef _LIBC +versioned_symbol (libc, _IO_new_do_write, _IO_do_write, GLIBC_2_1); +versioned_symbol (libc, _IO_new_file_attach, _IO_file_attach, GLIBC_2_1); +versioned_symbol (libc, _IO_new_file_close_it, _IO_file_close_it, GLIBC_2_1); +versioned_symbol (libc, _IO_new_file_finish, _IO_file_finish, GLIBC_2_1); +versioned_symbol (libc, _IO_new_file_fopen, _IO_file_fopen, GLIBC_2_1); +versioned_symbol (libc, _IO_new_file_init, _IO_file_init, GLIBC_2_1); +versioned_symbol (libc, _IO_new_file_setbuf, _IO_file_setbuf, GLIBC_2_1); +versioned_symbol (libc, _IO_new_file_sync, _IO_file_sync, GLIBC_2_1); +versioned_symbol (libc, _IO_new_file_overflow, _IO_file_overflow, GLIBC_2_1); +versioned_symbol (libc, _IO_new_file_seekoff, _IO_file_seekoff, GLIBC_2_1); +versioned_symbol (libc, _IO_new_file_underflow, _IO_file_underflow, GLIBC_2_1); +versioned_symbol (libc, _IO_new_file_write, _IO_file_write, GLIBC_2_1); +versioned_symbol (libc, _IO_new_file_xsputn, _IO_file_xsputn, GLIBC_2_1); +#endif diff --git a/libstdc++-v3/libio/gen-params b/libstdc++-v3/libio/gen-params deleted file mode 100755 index 6c07b46b36bf..000000000000 --- a/libstdc++-v3/libio/gen-params +++ /dev/null @@ -1,751 +0,0 @@ -#!/bin/sh -# Copyright (C) 1992, 1993, 1994, 1997, 1998, 1999 Free Software Foundation -# -# This file is part of the GNU IO Library. This library is free -# software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the -# Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this library; see the file COPYING. If not, write to the Free -# Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -# Written by Per Bothner (bothner@cygnus.com) - -# This is a shell-script that figures out various things about a -# system, and writes (to stdout) a C-style include files with -# suitable definitions, including all the standard Posix types. -# It works by compiling various test programs -- some are run through -# the C pre-processor, and the output examined. -# The test programs are only compiled, not executed, so the script -# should even if you're cross-compiling. -# It uses $CC (which defaults to cc) to compile C programs (extension .c), -# and $CXX (which defaults to gcc) to compile C++ programs (extension .C). -# The shell-script is written for libg++.a. - -# Usage: gen-params [NAME1=name1 ...] -# - where an assignment (such as size_t="unsigned int" means to -# use that value, instead of trying to figure it out. - -# Uncomment following line for debugging -# set -x - -SED=sed - -# Evaluate the arguments (which should be assignments): -for arg in "$@"; do - # Quote arg (i.e. FOO=bar => FOO='bar'), then eval it. - eval `echo "$arg" | ${SED} -e "s|^\(.*\)=\(.*\)|\1='\2'|"` -done - -macro_prefix=${macro_prefix-"_G_"} -rootdir=`pwd`/.. -gccdir=${gccdir-${rootdir}/gcc} -binutilsdir=${binutilsdir-${rootdir}/binutils} -CC=${CC-`if [ -f ${gccdir}/xgcc ] ; \ - then echo ${gccdir}/xgcc -B${gccdir}/ ; \ - else echo cc ; fi`} -CXX=${CXX-`if [ -f ${gccdir}/xgcc ] ; \ - then echo ${gccdir}/xgcc -B${gccdir}/ ; \ - else echo gcc ; fi`} -CPP=${CPP-`echo ${CC} -E`} -CONFIG_NM=${CONFIG_NM-`if [ -f ${binutilsdir}/nm.new ] ; \ - then echo ${binutilsdir}/nm.new ; \ - else echo nm ; fi`} - -# 2000-02-20 bkoz -# Eventually use AC_CHECK_PROG(NM,nm,nm) instead of this hackery. -# For now, as solaris and cygwin seem to require this, hardwire it. -if test -z "$CONFIG_NM"; then - CONFIG_NM=nm -fi - -cat <dummy.h <dummy.C <&2; exit -1; - fi - fi - echo "#define ${macro_prefix}NAMES_HAVE_UNDERSCORE ${NAMES_HAVE_UNDERSCORE}" - - if test -z "${VTABLE_LABEL_PREFIX}" ; then - # Determine how virtual function tables are named. This is fragile, - # because different nm's produce output in different formats. - ${CONFIG_NM} dummy.o >TMP - if [ -n "`${SED} -n -e 's/ virtual table/nope/p' TMP 2>/dev/null || - ${CONFIG_NM} --no-demangle dummy.o >TMP 2>/dev/null || - ${CONFIG_NM} dummy.o >TMP 2>/dev/null - fi - # First we look for a pattern that matches historical output from g++. - # We surround the actual label name by <> to separate it from - # other nm junk. - ${SED} -n -e 's/_*vt[$_.]7*filebuf/<&>/p' dummy.out - # For paranoia's sake (e.g. if we're using some other C++ compiler) - # we try a more general pattern, and append the result. - grep -v foo /p' \ - >>dummy.out - # Now we get rid of the <>, and any other junk on the nm output line. - # (We get rid of in case nm included debugging output for - # class filebuf itself.) On windows32, we also need to delete the - # unique sections (.data$_vt$*), otherwise we get the wrong result. - # Finally, we select the first line of the result, and hope that's - # what we wanted! - vtab_name=`${SED} -n -e '//d' \ - -e '/\.data[$_.]<_vt\$7filebuf>/d' \ - -e 's/^.*<\(.*\)>.*$/\1/p' \ - &2; exit 1 -# fi - else - # The compile failed for some reason (no C++?) - echo "gen-params: could not compile dummy.C with ${CXX}" 1>&2; exit 1; - fi -fi - -# A little test program to check if struct stat has st_blksize. -cat >dummy.c < -#include -int BLKSIZE(struct stat *st) -{ - return st->st_blksize; -} -!EOF! - -if ${CC} -c dummy.c >/dev/null 2>&1 ; then - echo "#define ${macro_prefix}HAVE_ST_BLKSIZE 1" -else - echo "#define ${macro_prefix}HAVE_ST_BLKSIZE 0" -fi - -# A little test program to check if the name 'clog' is defined in libm, -# as it is under DEC UNIX. -cat >dummy.c <&1 >/dev/null | grep clog >/dev/null; then - echo "#define ${macro_prefix}CLOG_CONFLICT 1" -fi - -echo "" - -# Next, generate definitions for the standard types (such as mode_t) -# compatible with those in the standard C header files. -# It works by a dummy program through the C pre-processor, and then -# using sed to search for typedefs in the output. - -for hdr in wchar wctype; do - eval $hdr=0 - cat >dummy.c < -EOF - if ${CPP} dummy.c >/dev/null 2>&1 ; then eval $hdr=1; fi -done - -cat >dummy.c < -#include -#ifdef __STDC__ -#include -#else /* !__STDC__ */ -#include -#endif /* __STDC__ */ -#include -#include -#include -#ifdef __STDC__ -#include -#endif -#if WCHAR == 1 -#include -#endif -#if WCTYPE == 1 -#include -#endif -#ifdef size_t -typedef size_t Xsize_t; -#elif defined(__SIZE_TYPE__) -typedef __SIZE_TYPE__ Xsize_t; -#endif -#ifdef ptrdiff_t -typedef ptrdiff_t Xptrdiff_t; -#elif defined(__PTRDIFF_TYPE__) -typedef __PTRDIFF_TYPE__ Xptrdiff_t; -#endif -#ifdef wchar_t -typedef wchar_t Xwchar_t; -#elif defined(__WCHAR_TYPE__) -typedef __WCHAR_TYPE__ Xwchar_t; -#endif -#ifdef va_list -typedef va_list XXXva_list; -#endif -#ifdef BUFSIZ -long XBUFSIZ=BUFSIZ; -#endif -#ifdef FOPEN_MAX -long XFOPEN_MAX=FOPEN_MAX; -#endif -#ifdef FILENAME_MAX -long XFILENAME_MAX=FILENAME_MAX; -#endif -#ifdef SHRT_MAX -long XSHRT_MAX=SHRT_MAX; -#endif -#ifdef INT_MAX -long XINT_MAX=INT_MAX; -#endif -#ifdef LONG_MAX -long XLONG_MAX=LONG_MAX; -#endif -#ifdef LONG_LONG_MAX -long XLONG_LONG_MAX=LONG_LONG_MAX; -#endif -!EOF! - -if ${CPP} dummy.c -DWCHAR=$wchar -DWCTYPE=$wctype >TMP ; then true -else - echo "gen-params: could not invoke ${CPP} on dummy.c" 1>&2 ; exit 1 -fi -tr ' ' ' ' dummy.out - -for TYPE in dev_t clock_t fpos_t gid_t ino_t mode_t nlink_t off_t pid_t ptrdiff_t sigset_t size_t ssize_t time_t uid_t va_list wchar_t wint_t int16_t uint16_t int32_t uint_32_t u_int16_t u_int32_t; do - eval IMPORTED=\$$TYPE - if [ -n "${IMPORTED}" ] ; then - eval "$TYPE='$IMPORTED'" - else - t=$TYPE - VALUE='' - - # Follow `typedef VALUE TYPE' chains, but don't loop indefinitely. - for iteration in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do - # Search dummy.out for a typedef for X*$t. - sed_script=" - s/unsigned long long int/_G_ullong/g - s/long long int/_G_llong/g - s/unsigned long long/_G_ullong/g - s/long long/_G_llong/g - /.*typedef *\\(.*[^ ]\\) *X*$t *;.*/{s||\1|;p;q;} - /.*typedef *\\(.*[^ a-zA-Z0-9_]\\)X*$t *;.*/{s||\1|;p;q;} - " - t=`${SED} -n "$sed_script" /dev/null - # Now select the first definition. - if [ -s TMP ]; then - eval "$NAME='"`${SED} -e '2,$d' /dev/null - # Now select the first definition. - if [ -s TMP ]; then - eval "$NAME='"`${SED} -e '2,$d' 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -typedef int ${macro_prefix}int8_t __attribute__((__mode__(__QI__))); -typedef unsigned int ${macro_prefix}uint8_t __attribute__((__mode__(__QI__))); -typedef int ${macro_prefix}int16_t __attribute__((__mode__(__HI__))); -typedef unsigned int ${macro_prefix}uint16_t __attribute__((__mode__(__HI__))); -typedef int ${macro_prefix}int32_t __attribute__((__mode__(__SI__))); -typedef unsigned int ${macro_prefix}uint32_t __attribute__((__mode__(__SI__))); -typedef int ${macro_prefix}int64_t __attribute__((__mode__(__DI__))); -typedef unsigned int ${macro_prefix}uint64_t __attribute__((__mode__(__DI__))); -#if __GNUC__ > 2 || __GNUC_MINOR__ >= 8 -__extension__ typedef long long ${macro_prefix}llong; -__extension__ typedef unsigned long long ${macro_prefix}ullong; -#endif -#else -typedef $int16_t ${macro_prefix}int16_t; -typedef $uint16_t ${macro_prefix}uint16_t; -typedef $int32_t ${macro_prefix}int32_t; -typedef $uint32_t ${macro_prefix}uint32_t; -#endif - -typedef ${clock_t-int /* default */} ${macro_prefix}clock_t; -typedef ${dev_t-int /* default */} ${macro_prefix}dev_t; -typedef ${fpos_t-long /* default */} ${macro_prefix}fpos_t; -typedef ${gid_t-int /* default */} ${macro_prefix}gid_t; -typedef ${ino_t-int /* default */} ${macro_prefix}ino_t; -typedef ${mode_t-int /* default */} ${macro_prefix}mode_t; -typedef ${nlink_t-int /* default */} ${macro_prefix}nlink_t; -typedef ${off_t-long /* default */} ${macro_prefix}off_t; -typedef ${pid_t-int /* default */} ${macro_prefix}pid_t; -#ifndef __PTRDIFF_TYPE__ -#define __PTRDIFF_TYPE__ ${ptrdiff_t-long int /* default */} -#endif -typedef __PTRDIFF_TYPE__ ${macro_prefix}ptrdiff_t; -typedef ${sigset_t-int /* default */} ${macro_prefix}sigset_t; -#ifndef __SIZE_TYPE__ -#define __SIZE_TYPE__ ${size_t-unsigned long /* default */} -#endif -typedef __SIZE_TYPE__ ${macro_prefix}size_t; -typedef ${time_t-int /* default */} ${macro_prefix}time_t; -typedef ${uid_t-int /* default */} ${macro_prefix}uid_t; -typedef ${wchar_t-int /* default */} ${macro_prefix}wchar_t; - -#define ${macro_prefix}BUFSIZ ${BUFSIZ-1024 /* default */} -#define ${macro_prefix}FOPEN_MAX ${FOPEN_MAX-32 /* default */} -#define ${macro_prefix}FILENAME_MAX ${FILENAME_MAX-1024 /* default */} -#if defined (__cplusplus) || defined (__STDC__) -#define ${macro_prefix}ARGS(ARGLIST) ARGLIST -#else -#define ${macro_prefix}ARGS(ARGLIST) () -#endif -#if !defined (__GNUG__) || defined (__STRICT_ANSI__) -#define ${macro_prefix}NO_NRV -#endif -#if !defined (__GNUG__) -#define _G_NO_EXTERN_TEMPLATES -#endif -!EOF! - -# ssize_t is the signed version of size_t -if [ -n "${ssize_t}" ] ; then - echo "typedef ${ssize_t} ${macro_prefix}ssize_t;" -elif [ -z "${size_t}" ] ; then - echo "typedef long ${macro_prefix}ssize_t;" -else - # Remove "unsigned" from ${size_t} to get ${ssize_t}. - tmp="`echo ${size_t} | ${SED} -e 's|unsigned||g' -e 's| | |g'`" - if [ -z "$tmp" ] ; then - tmp=int - else - # check $tmp doesn't conflict with - echo "#include - extern $tmp read();" >dummy.c - ${CC} -c dummy.c >/dev/null 2>&1 || tmp=int - fi - echo "typedef $tmp /* default */ ${macro_prefix}ssize_t;" -fi - -# wint_t is often the integral type to which wchar_t promotes. -if [ -z "${wint_t}" ] ; then - for TYPE in int 'unsigned int' 'long int' 'long unsigned int'; do - cat >dummy.C </dev/null 2>&1 ; then - wint_t="$TYPE /* default */" - break - fi - done -fi -echo "typedef ${wint_t-int /* wchar_t is broken */} ${macro_prefix}wint_t;" - -# va_list can cause problems (e.g. some systems have va_list as a struct). -# Check to see if ${va_list-char*} really is compatible with stdarg.h. -cat >dummy.C < -} -long foo(X_va_list ap) { return va_arg(ap, long); } -long bar(int i, ...) -{ va_list ap; long j; va_start(ap, i); j = foo(ap); va_end(ap); return j; } -!EOF! -if ${CXX} -c dummy.C >/dev/null 2>&1 ; then - # Ok: We have something that works. - echo "typedef ${va_list-char* /* default */} ${macro_prefix}va_list;" -else - echo "#define ${macro_prefix}NEED_STDARG_H" - # Check and see if we have __gnuc_va_list, as we might set up define - # loops if we use va_list. - cat >dummy.C < -long foo(__gnuc_va_list ap) { return va_arg(ap, long); } -!EOF! - if ${CXX} -c dummy.C >/dev/null 2>&1 ; then - echo "#define ${macro_prefix}va_list __gnuc_va_list" - else - echo "#define ${macro_prefix}va_list va_list" - fi -fi - -cat >dummy.c < -extern int (*signal())(); -extern int dummy (int); -main() -{ - int (*oldsig)(int) = signal (1, dummy); - (void) signal (2, oldsig); - return 0; -} -!EOF! -if ${CC} -c dummy.c >/dev/null 2>&1 ; then - echo "#define ${macro_prefix}signal_return_type int" -else - echo "#define ${macro_prefix}signal_return_type void" -fi - -# check sprintf return type - -cat >dummy.c < -extern int sprintf(); char buf[100]; -int main() { return sprintf(buf, "%d", 34); } -!EOF! -if ${CC} -c dummy.c >/dev/null 2>&1 ; then - echo "#define ${macro_prefix}sprintf_return_type int" -else - echo "#define ${macro_prefix}sprintf_return_type char*" -fi - -if test -n "${HAVE_ATEXIT}" ; then - echo "#define ${macro_prefix}HAVE_ATEXIT ${HAVE_ATEXIT}" -else - cat >dummy.c < -int main() -{ - atexit (0); -} -!EOF! - if ${CC} dummy.c >/dev/null 2>&1 ; then - echo "#define ${macro_prefix}HAVE_ATEXIT 1" - else - echo "#define ${macro_prefix}HAVE_ATEXIT 0" - fi -fi - - -# *** Check for presence of certain include files *** - -# check for sys/resource.h - -if test -n "${HAVE_SYS_RESOURCE}" ; then - echo "#define ${macro_prefix}HAVE_SYS_RESOURCE ${HAVE_SYS_RESOURCE}" -else - cat >dummy.c < -#include -#include - int main() - { - struct rusage res; - getrusage(RUSAGE_SELF, &res); - return (int)(res.ru_utime.tv_sec + (res.ru_utime.tv_usec / 1000000.0)); - } -!EOF! - # Note: We link because some systems have sys/resource, but not getrusage(). - if ${CC} dummy.c >/dev/null 2>&1 ; then - echo "#define ${macro_prefix}HAVE_SYS_RESOURCE 1" - else - echo "#define ${macro_prefix}HAVE_SYS_RESOURCE 0" - fi -fi - -# check for struct tms in sys/times.h - -if test -n "${HAVE_SYS_TIMES}" ; then - echo "#define ${macro_prefix}HAVE_SYS_TIMES ${HAVE_SYS_TIMES}" -else - cat >dummy.c < -#include - int main() - { - struct tms s; - return s.tms_utime; - } -!EOF! - if ${CC} -c dummy.c >/dev/null 2>&1 ; then - echo "#define ${macro_prefix}HAVE_SYS_TIMES 1" - else - echo "#define ${macro_prefix}HAVE_SYS_TIMES 0" - fi -fi - -# check for sys/socket.h - -if test -n "${HAVE_SYS_SOCKET}" ; then - echo "#define ${macro_prefix}HAVE_SYS_SOCKET ${HAVE_SYS_SOCKET}" -else - echo '#include ' >dummy.c - echo '#include ' >>dummy.c - if ${CC} -c dummy.c >/dev/null 2>&1 ; then - echo "#define ${macro_prefix}HAVE_SYS_SOCKET 1" - else - echo "#define ${macro_prefix}HAVE_SYS_SOCKET 0" - fi -fi - -# check for sys/cdefs.h - -if test -n "${HAVE_SYS_CDEFS}" ; then - echo "#define ${macro_prefix}HAVE_SYS_CDEFS ${HAVE_SYS_CDEFS}" -else - echo '#include ' >dummy.c - echo 'extern int myfunc __P((int, int));' >>dummy.c - if ${CC} -c dummy.c >/dev/null 2>&1 ; then - echo "#define ${macro_prefix}HAVE_SYS_CDEFS 1" - else - echo "#define ${macro_prefix}HAVE_SYS_CDEFS 0" - fi -fi - -# Check for a (Posix-compatible) sys/wait.h */ - -if test -n "${HAVE_SYS_WAIT}" ; then - echo "#define ${macro_prefix}HAVE_SYS_WAIT ${HAVE_SYS_WAIT}" -else - cat >dummy.c < -#include - int f() { int i; wait(&i); return i; } -!EOF! - if ${CC} -c dummy.c >/dev/null 2>&1 ; then - echo "#define ${macro_prefix}HAVE_SYS_WAIT 1" - else - echo "#define ${macro_prefix}HAVE_SYS_WAIT 0" - fi -fi - -if test -n "${HAVE_UNISTD}" ; then - echo "#define ${macro_prefix}HAVE_UNISTD ${HAVE_UNISTD}" -else - echo '#include ' >dummy.c - if ${CC} -c dummy.c >/dev/null 2>&1 ; then - echo "#define ${macro_prefix}HAVE_UNISTD 1" - else - echo "#define ${macro_prefix}HAVE_UNISTD 0" - fi -fi - -if test -n "${HAVE_DIRENT}" ; then - echo "#define ${macro_prefix}HAVE_DIRENT ${HAVE_DIRENT}" -else - echo '#include -#include ' >dummy.c - if ${CC} -c dummy.c >/dev/null 2>&1 ; then - echo "#define ${macro_prefix}HAVE_DIRENT 1" - else - echo "#define ${macro_prefix}HAVE_DIRENT 0" - fi -fi - -if test -n "${HAVE_CURSES}" ; then - echo "#define ${macro_prefix}HAVE_CURSES ${HAVE_CURSES}" -else - echo '#include ' >dummy.c - if ${CC} -c dummy.c >/dev/null 2>&1 ; then - echo "#define ${macro_prefix}HAVE_CURSES 1" - else - echo "#define ${macro_prefix}HAVE_CURSES 0" - fi -fi - -# There is no test for this at the moment; it is just set by the -# configuration files. -if test -n "${MATH_H_INLINES}" ; then - echo "#define ${macro_prefix}MATH_H_INLINES ${MATH_H_INLINES}" -else - echo "#define ${macro_prefix}MATH_H_INLINES 0" -fi - -if test -n "${HAVE_BOOL}" ; then - echo "#define ${macro_prefix}HAVE_BOOL ${HAVE_BOOL}" -else - echo 'bool i=true,j=false;' >dummy.C - if ${CXX} -c dummy.C >/dev/null 2>&1 ; then - echo "#define ${macro_prefix}HAVE_BOOL 1" - else - echo "#define ${macro_prefix}HAVE_BOOL 0" - fi -fi - -if test -n "${NO_USE_DTOA}" ; then - echo "#define ${macro_prefix}NO_USE_DTOA 1" -fi -if test -n "${USE_INT32_FLAGS}" ; then - echo "#define ${macro_prefix}USE_INT32_FLAGS 1" -fi - -if test -n "$HAVE_PRINTF_FP"; then - echo "#define ${macro_prefix}HAVE_PRINTF_FP $HAVE_PRINTF_FP" - echo "#define ${macro_prefix}HAVE_LONG_DOUBLE_IO $HAVE_LONG_DOUBLE_IO" -else - # A little test program to check if __printf_fp is available. - cat >dummy.c </dev/null 2>&1 ; then - echo "#define ${macro_prefix}HAVE_PRINTF_FP 1" - echo "#define ${macro_prefix}HAVE_LONG_DOUBLE_IO 1" - else - echo "#define ${macro_prefix}HAVE_PRINTF_FP 0" - echo "#define ${macro_prefix}HAVE_LONG_DOUBLE_IO 0" - fi -fi - -# Uncomment the following line if you don't have working templates. -# echo "#define ${macro_prefix}NO_TEMPLATES" - -# Override bogus definitions of NULL in system headers. -cat < -EOF - -rm -f dummy.C dummy.o dummy.c dummy.out TMP core a.out - -echo "#endif /* !${macro_prefix}config_h */" diff --git a/libstdc++-v3/libio/genops.c b/libstdc++-v3/libio/genops.c index c7da3210eaf5..0fb89f76cd97 100644 --- a/libstdc++-v3/libio/genops.c +++ b/libstdc++-v3/libio/genops.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1997-1999, 2000 Free Software Foundation, Inc. This file is part of the GNU IO Library. This library is free software; you can redistribute it and/or @@ -31,46 +31,63 @@ #endif #include +#ifdef _IO_MTSAFE_IO +static _IO_lock_t list_all_lock = _IO_lock_initializer; +#endif + void _IO_un_link (fp) - _IO_FILE *fp; + struct _IO_FILE_plus *fp; { - if (fp->_flags & _IO_LINKED) + if (fp->file._flags & _IO_LINKED) { - _IO_FILE **f; - for (f = &_IO_list_all; *f != NULL; f = &(*f)->_chain) + struct _IO_FILE_plus **f; +#ifdef _IO_MTSAFE_IO + _IO_lock_lock (list_all_lock); +#endif + for (f = &_IO_list_all; *f != NULL; f = &(*f)->file._chain) { if (*f == fp) { - *f = fp->_chain; + *f = fp->file._chain; break; } } - fp->_flags &= ~_IO_LINKED; +#ifdef _IO_MTSAFE_IO + _IO_lock_unlock (list_all_lock); +#endif + fp->file._flags &= ~_IO_LINKED; } } void _IO_link_in (fp) - _IO_FILE *fp; + struct _IO_FILE_plus *fp; { - if ((fp->_flags & _IO_LINKED) == 0) + if ((fp->file._flags & _IO_LINKED) == 0) { - fp->_flags |= _IO_LINKED; - fp->_chain = _IO_list_all; + fp->file._flags |= _IO_LINKED; +#ifdef _IO_MTSAFE_IO + _IO_lock_lock (list_all_lock); +#endif + fp->file._chain = _IO_list_all; _IO_list_all = fp; +#ifdef _IO_MTSAFE_IO + _IO_lock_unlock (list_all_lock); +#endif } } /* Return minimum _pos markers Assumes the current get area is the main get area. */ -static _IO_size_t _IO_least_marker __P ((_IO_FILE *fp)); +_IO_ssize_t _IO_least_marker __P ((_IO_FILE *fp, char *end_p)); -static _IO_size_t -_IO_least_marker (fp) +_IO_ssize_t +_IO_least_marker (fp, end_p) _IO_FILE *fp; + char *end_p; { - _IO_ssize_t least_so_far = fp->_IO_read_end - fp->_IO_read_base; + _IO_ssize_t least_so_far = end_p - fp->_IO_read_base; struct _IO_marker *mark; for (mark = fp->_markers; mark != NULL; mark = mark->_next) if (mark->_pos < least_so_far) @@ -94,7 +111,7 @@ _IO_switch_to_main_get_area (fp) tmp = fp->_IO_read_base; fp->_IO_read_base = fp->_IO_save_base; fp->_IO_save_base = tmp; - + /* Set _IO_read_ptr. */ fp->_IO_read_ptr = fp->_IO_read_base; } @@ -110,11 +127,11 @@ _IO_switch_to_backup_area (fp) tmp = fp->_IO_read_end; fp->_IO_read_end = fp->_IO_save_end; fp->_IO_save_end = tmp; - /* Swap _gbase and _IO_save_base. */ + /* Swap _IO_read_base and _IO_save_base. */ tmp = fp->_IO_read_base; fp->_IO_read_base = fp->_IO_save_base; fp->_IO_save_base = tmp; - + /* Set _IO_read_ptr. */ fp->_IO_read_ptr = fp->_IO_read_end; } @@ -180,19 +197,28 @@ __overflow (f, ch) return _IO_OVERFLOW (f, ch); } -static int save_for_backup __P ((_IO_FILE *fp)); +static int save_for_backup __P ((_IO_FILE *fp, char *end_p)) +#ifdef _LIBC + internal_function +#endif + ; - static int -save_for_backup (fp) +static int +#ifdef _LIBC +internal_function +#endif +save_for_backup (fp, end_p) _IO_FILE *fp; + char *end_p; { - /* Append [_IO_read_base.._IO_read_end] to backup area. */ - int least_mark = _IO_least_marker (fp); + /* Append [_IO_read_base..end_p] to backup area. */ + _IO_ssize_t least_mark = _IO_least_marker (fp, end_p); /* needed_size is how much space we need in the backup area. */ - int needed_size = (fp->_IO_read_end - fp->_IO_read_base) - least_mark; - int current_Bsize = fp->_IO_save_end - fp->_IO_save_base; - int avail; /* Extra space available for future expansion. */ - int delta; + _IO_size_t needed_size = (end_p - fp->_IO_read_base) - least_mark; + /* FIXME: Dubious arithmetic if pointers are NULL */ + _IO_size_t current_Bsize = fp->_IO_save_end - fp->_IO_save_base; + _IO_size_t avail; /* Extra space available for future expansion. */ + _IO_ssize_t delta; struct _IO_marker *mark; if (needed_size > current_Bsize) { @@ -203,12 +229,20 @@ save_for_backup (fp) return EOF; /* FIXME */ if (least_mark < 0) { +#ifdef _LIBC + __mempcpy (__mempcpy (new_buffer + avail, + fp->_IO_save_end + least_mark, + -least_mark), + fp->_IO_read_base, + end_p - fp->_IO_read_base); +#else memcpy (new_buffer + avail, fp->_IO_save_end + least_mark, -least_mark); memcpy (new_buffer + avail - least_mark, fp->_IO_read_base, - fp->_IO_read_end - fp->_IO_read_base); + end_p - fp->_IO_read_base); +#endif } else memcpy (new_buffer + avail, @@ -229,17 +263,16 @@ save_for_backup (fp) -least_mark); memcpy (fp->_IO_save_base + avail - least_mark, fp->_IO_read_base, - fp->_IO_read_end - fp->_IO_read_base); + end_p - fp->_IO_read_base); } else if (needed_size > 0) memcpy (fp->_IO_save_base + avail, fp->_IO_read_base + least_mark, needed_size); } - /* FIXME: Dubious arithmetic if pointers are NULL */ fp->_IO_backup_base = fp->_IO_save_base + avail; /* Adjust all the streammarkers. */ - delta = fp->_IO_read_end - fp->_IO_read_base; + delta = end_p - fp->_IO_read_base; for (mark = fp->_markers; mark != NULL; mark = mark->_next) mark->_pos -= delta; return 0; @@ -249,6 +282,11 @@ int __underflow (fp) _IO_FILE *fp; { +#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T + if (fp->_vtable_offset == 0 && _IO_fwide (fp, -1) != -1) + return EOF; +#endif + if (_IO_in_put_mode (fp)) if (_IO_switch_to_get_mode (fp) == EOF) return EOF; @@ -262,7 +300,7 @@ __underflow (fp) } if (_IO_have_markers (fp)) { - if (save_for_backup (fp)) + if (save_for_backup (fp, fp->_IO_read_end)) return EOF; } else if (_IO_have_backup (fp)) @@ -274,6 +312,11 @@ int __uflow (fp) _IO_FILE *fp; { +#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T + if (fp->_vtable_offset == 0 && _IO_fwide (fp, -1) != -1) + return EOF; +#endif + if (_IO_in_put_mode (fp)) if (_IO_switch_to_get_mode (fp) == EOF) return EOF; @@ -287,7 +330,7 @@ __uflow (fp) } if (_IO_have_markers (fp)) { - if (save_for_backup (fp)) + if (save_for_backup (fp, fp->_IO_read_end)) return EOF; } else if (_IO_have_backup (fp)) @@ -361,9 +404,13 @@ _IO_default_xsputn (f, data, n) count = more; if (count > 20) { +#ifdef _LIBC + f->_IO_write_ptr = __mempcpy (f->_IO_write_ptr, s, count); +#else memcpy (f->_IO_write_ptr, s, count); - s += count; f->_IO_write_ptr += count; +#endif + s += count; } else if (count <= 0) count = 0; @@ -377,7 +424,7 @@ _IO_default_xsputn (f, data, n) } more -= count; } - if (more == 0 || __overflow (f, (unsigned char) *s++) == EOF) + if (more == 0 || _IO_OVERFLOW (f, (unsigned char) *s++) == EOF) break; more--; } @@ -412,8 +459,12 @@ _IO_default_xsgetn (fp, data, n) count = more; if (count > 20) { +#ifdef _LIBC + s = __mempcpy (s, fp->_IO_read_ptr, count); +#else memcpy (s, fp->_IO_read_ptr, count); s += count; +#endif fp->_IO_read_ptr += count; } else if (count <= 0) @@ -467,24 +518,15 @@ _IO_default_setbuf (fp, p, len) return fp; } -#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001 _IO_off64_t _IO_default_seekpos (fp, pos, mode) _IO_FILE *fp; _IO_off64_t pos; int mode; -#else -_IO_off_t -_IO_default_seekpos (fp, pos, mode) - _IO_FILE *fp; - _IO_off_t pos; - int mode; -#endif { return _IO_SEEKOFF (fp, pos, 0, mode); } - int _IO_default_doallocate (fp) _IO_FILE *fp; @@ -500,6 +542,17 @@ void _IO_init (fp, flags) _IO_FILE *fp; int flags; +{ + _IO_no_init (fp, flags, -1, NULL, NULL); +} + +void +_IO_no_init (fp, flags, orientation, wd, jmp) + _IO_FILE *fp; + int flags; + int orientation; + struct _IO_wide_data *wd; + struct _IO_jump_t *jmp; { fp->_flags = _IO_MAGIC|flags; fp->_IO_buf_base = NULL; @@ -517,8 +570,31 @@ _IO_init (fp, flags) fp->_IO_save_end = NULL; fp->_markers = NULL; fp->_cur_column = 0; +#if _IO_JUMPS_OFFSET + fp->_vtable_offset = 0; +#endif #ifdef _IO_MTSAFE_IO _IO_lock_init (*fp->_lock); +#endif + fp->_mode = orientation; +#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T + if (orientation >= 0) + { + fp->_wide_data = wd; + fp->_wide_data->_IO_buf_base = NULL; + fp->_wide_data->_IO_buf_end = NULL; + fp->_wide_data->_IO_read_base = NULL; + fp->_wide_data->_IO_read_ptr = NULL; + fp->_wide_data->_IO_read_end = NULL; + fp->_wide_data->_IO_write_base = NULL; + fp->_wide_data->_IO_write_ptr = NULL; + fp->_wide_data->_IO_write_end = NULL; + fp->_wide_data->_IO_save_base = NULL; + fp->_wide_data->_IO_backup_base = NULL; + fp->_wide_data->_IO_save_end = NULL; + + fp->_wide_data->_wide_vtable = jmp; + } #endif } @@ -557,24 +633,15 @@ _IO_default_finish (fp, dummy) _IO_lock_fini (*fp->_lock); #endif - _IO_un_link (fp); + _IO_un_link ((struct _IO_FILE_plus *) fp); } -#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001 _IO_off64_t _IO_default_seekoff (fp, offset, dir, mode) _IO_FILE *fp; _IO_off64_t offset; int dir; int mode; -#else -_IO_off_t -_IO_default_seekoff (fp, offset, dir, mode) - _IO_FILE *fp; - _IO_off_t offset; - int dir; - int mode; -#endif { return _IO_pos_BAD; } @@ -678,10 +745,17 @@ int _IO_flush_all () { int result = 0; - _IO_FILE *fp; - for (fp = _IO_list_all; fp != NULL; fp = fp->_chain) - if (fp->_IO_write_ptr > fp->_IO_write_base - && _IO_OVERFLOW (fp, EOF) == EOF) + struct _IO_FILE_plus *fp; + for (fp = _IO_list_all; fp != NULL; fp = fp->file._chain) + if (((fp->file._mode < 0 && fp->file._IO_write_ptr > fp->file._IO_write_base) +#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T + + || (fp->file._vtable_offset == 0 + && fp->file._mode > 0 && (fp->file._wide_data->_IO_write_ptr + > fp->file._wide_data->_IO_write_base)) +#endif + ) + && _IO_OVERFLOW (&fp->file, EOF) == EOF) result = EOF; return result; } @@ -689,27 +763,29 @@ _IO_flush_all () void _IO_flush_all_linebuffered () { - _IO_FILE *fp; - for (fp = _IO_list_all; fp != NULL; fp = fp->_chain) - if ((fp->_flags & _IO_NO_WRITES) == 0 && fp->_flags & _IO_LINE_BUF) - _IO_OVERFLOW (fp, EOF); + struct _IO_FILE_plus *fp; + for (fp = _IO_list_all; fp != NULL; fp = fp->file._chain) + if ((fp->file._flags & _IO_NO_WRITES) == 0 && fp->file._flags & _IO_LINE_BUF) + _IO_OVERFLOW (&fp->file, EOF); } -static void _IO_unbuffer_all __P ((void)); +static void _IO_unbuffer_write __P ((void)); static void -_IO_unbuffer_all () +_IO_unbuffer_write () { - _IO_FILE *fp; - for (fp = _IO_list_all; fp != NULL; fp = fp->_chain) - if (! (fp->_flags & _IO_UNBUFFERED)) - _IO_SETBUF (fp, NULL, 0); + struct _IO_FILE_plus *fp; + for (fp = _IO_list_all; fp != NULL; fp = fp->file._chain) + if (! (fp->file._flags & _IO_UNBUFFERED) + && (! (fp->file._flags & _IO_NO_WRITES) + || (fp->file._flags & _IO_IS_APPENDING))) + _IO_SETBUF (&fp->file, NULL, 0); } -void +int _IO_cleanup () { - _IO_flush_all (); + int result = _IO_flush_all (); /* We currently don't have a reliable mechanism for making sure that C++ static destructors are executed in the correct order. @@ -718,9 +794,12 @@ _IO_cleanup () The following will make the standard streambufs be unbuffered, which forces any output from late destructors to be written out. */ - _IO_unbuffer_all (); + _IO_unbuffer_write (); + + return result; } + void _IO_init_marker (marker, fp) struct _IO_marker *marker; @@ -857,23 +936,34 @@ _IO_default_pbackfail (fp, c) _IO_FILE *fp; int c; { - if (fp->_IO_read_ptr <= fp->_IO_read_base) + if (fp->_IO_read_ptr > fp->_IO_read_base && !_IO_in_backup (fp) + && (unsigned char) fp->_IO_read_ptr[-1] == c) + --fp->_IO_read_ptr; + else { /* Need to handle a filebuf in write mode (switch to read mode). FIXME!*/ - if (_IO_have_backup (fp) && !_IO_in_backup (fp)) - _IO_switch_to_backup_area (fp); - - if (!_IO_have_backup (fp)) + if (!_IO_in_backup (fp)) { - /* No backup buffer: allocate one. */ - /* Use nshort buffer, if unused? (probably not) FIXME */ - int backup_size = 128; - char *bbuf = (char *) malloc (backup_size); - if (bbuf == NULL) - return EOF; - fp->_IO_save_base = bbuf; - fp->_IO_save_end = fp->_IO_save_base + backup_size; - fp->_IO_backup_base = fp->_IO_save_end; + /* We need to keep the invariant that the main get area + logically follows the backup area. */ + if (fp->_IO_read_ptr > fp->_IO_read_base && _IO_have_backup (fp)) + { + if (save_for_backup (fp, fp->_IO_read_ptr)) + return EOF; + } + else if (!_IO_have_backup (fp)) + { + /* No backup buffer: allocate one. */ + /* Use nshort buffer, if unused? (probably not) FIXME */ + int backup_size = 128; + char *bbuf = (char *) malloc (backup_size); + if (bbuf == NULL) + return EOF; + fp->_IO_save_base = bbuf; + fp->_IO_save_end = fp->_IO_save_base + backup_size; + fp->_IO_backup_base = fp->_IO_save_end; + } + fp->_IO_read_base = fp->_IO_read_ptr; _IO_switch_to_backup_area (fp); } else if (fp->_IO_read_ptr <= fp->_IO_read_base) @@ -893,26 +983,17 @@ _IO_default_pbackfail (fp, c) new_buf + new_size); fp->_IO_backup_base = fp->_IO_read_ptr; } + + *--fp->_IO_read_ptr = c; } - --fp->_IO_read_ptr; - if (c != EOF && *fp->_IO_read_ptr != c) - *fp->_IO_read_ptr = c; - return (unsigned char) *fp->_IO_read_ptr; + return (unsigned char) c; } -#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001 _IO_off64_t _IO_default_seek (fp, offset, dir) _IO_FILE *fp; _IO_off64_t offset; int dir; -#else -_IO_off_t -_IO_default_seek (fp, offset, dir) - _IO_FILE *fp; - _IO_off_t offset; - int dir; -#endif { return _IO_pos_BAD; } @@ -943,6 +1024,70 @@ _IO_default_write (fp, data, n) return 0; } +int +_IO_default_showmanyc (fp) + _IO_FILE *fp; +{ + return -1; +} + +void +_IO_default_imbue (fp, locale) + _IO_FILE *fp; + void *locale; +{ +} + +_IO_ITER +_IO_iter_begin() +{ + return _IO_list_all; +} + +_IO_ITER +_IO_iter_end() +{ + return NULL; +} + +_IO_ITER +_IO_iter_next(iter) + _IO_ITER iter; +{ + return iter->file._chain; +} + +_IO_FILE * +_IO_iter_file(iter) + _IO_ITER iter; +{ + return (_IO_FILE *) iter; +} + +void +_IO_list_lock() +{ +#ifdef _IO_MTSAFE_IO + _IO_lock_lock (list_all_lock); +#endif +} + +void +_IO_list_unlock() +{ +#ifdef _IO_MTSAFE_IO + _IO_lock_unlock (list_all_lock); +#endif +} + +void +_IO_list_resetlock() +{ +#ifdef _IO_MTSAFE_IO + _IO_lock_init (list_all_lock); +#endif +} + #ifdef TODO #if defined(linux) @@ -963,8 +1108,6 @@ __io_defs io_defs__; #ifdef weak_alias weak_alias (_IO_cleanup, _cleanup) -#elif defined(_G_STDIO_USES_LIBIO) && defined(_G_HAVE_WEAK_SYMBOL) -void _cleanup () __attribute__ ((weak, alias ("_IO_cleanup"))); #endif #ifdef text_set_element diff --git a/libstdc++-v3/libio/iofwide.c b/libstdc++-v3/libio/iofwide.c new file mode 100644 index 000000000000..39c7b02ee9d9 --- /dev/null +++ b/libstdc++-v3/libio/iofwide.c @@ -0,0 +1,472 @@ +/* Copyright (C) 1999, 2000 Free Software Foundation, Inc. + This file is part of the GNU IO Library. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2, or (at + your option) any later version. + + This library is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, Boston, + MA 02111-1307, USA. + + As a special exception, if you link this library with files + compiled with a GNU compiler to produce an executable, this does + not cause the resulting executable to be covered by the GNU General + Public License. This exception does not however invalidate any + other reasons why the executable file might be covered by the GNU + General Public License. */ + +#include +#ifdef _LIBC +# include +# include +#endif +#include +#include + +#ifdef _LIBC +# include +# include +# include +#endif + + +/* Prototypes of libio's codecvt functions. */ +static enum __codecvt_result do_out (struct _IO_codecvt *codecvt, + __mbstate_t *statep, + const wchar_t *from_start, + const wchar_t *from_end, + const wchar_t **from_stop, char *to_start, + char *to_end, char **to_stop); +static enum __codecvt_result do_unshift (struct _IO_codecvt *codecvt, + __mbstate_t *statep, char *to_start, + char *to_end, char **to_stop); +static enum __codecvt_result do_in (struct _IO_codecvt *codecvt, + __mbstate_t *statep, + const char *from_start, + const char *from_end, + const char **from_stop, wchar_t *to_start, + wchar_t *to_end, wchar_t **to_stop); +static int do_encoding (struct _IO_codecvt *codecvt); +static int do_length (struct _IO_codecvt *codecvt, __mbstate_t *statep, + const char *from_start, + const char *from_end, _IO_size_t max); +static int do_max_length (struct _IO_codecvt *codecvt); +static int do_always_noconv (struct _IO_codecvt *codecvt); + + +/* The functions used in `codecvt' for libio are always the same. */ +struct _IO_codecvt __libio_codecvt = +{ + .__codecvt_destr = NULL, /* Destructor, never used. */ + .__codecvt_do_out = do_out, + .__codecvt_do_unshift = do_unshift, + .__codecvt_do_in = do_in, + .__codecvt_do_encoding = do_encoding, + .__codecvt_do_always_noconv = do_always_noconv, + .__codecvt_do_length = do_length, + .__codecvt_do_max_length = do_max_length +}; + + +/* Return orientation of stream. If mode is nonzero try to change + the orientation first. */ +#undef _IO_fwide +int +_IO_fwide (fp, mode) + _IO_FILE *fp; + int mode; +{ + /* Normalize the value. */ + mode = mode < 0 ? -1 : (mode == 0 ? 0 : 1); + + if (mode == 0 || fp->_mode != 0) + /* The caller simply wants to know about the current orientation + or the orientation already has been determined. */ + return fp->_mode; + + _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp); + _IO_flockfile (fp); + + /* Set the orientation appropriately. */ + if (mode > 0) + { + struct _IO_codecvt *cc = &fp->_wide_data->_codecvt; + + fp->_wide_data->_IO_read_ptr = fp->_wide_data->_IO_read_end; + fp->_wide_data->_IO_write_ptr = fp->_wide_data->_IO_write_base; + + /* The functions are always the same. */ + *cc = __libio_codecvt; + + /* Get the character conversion functions based on the currently + selected locale for LC_CTYPE. */ +#ifdef _LIBC + { + struct gconv_fcts fcts; + + /* Clear the state. We start all over again. */ + memset (&fp->_wide_data->_IO_state, '\0', sizeof (__mbstate_t)); + memset (&fp->_wide_data->_IO_last_state, '\0', sizeof (__mbstate_t)); + + __wcsmbs_clone_conv (&fcts); + + cc->__cd_in.__cd.__nsteps = 1; /* Only one step allowed. */ + cc->__cd_in.__cd.__steps = fcts.towc; + + cc->__cd_in.__cd.__data[0].__invocation_counter = 0; + cc->__cd_in.__cd.__data[0].__internal_use = 1; + cc->__cd_in.__cd.__data[0].__flags = __GCONV_IS_LAST; + cc->__cd_in.__cd.__data[0].__statep = &fp->_wide_data->_IO_state; + + /* XXX For now no transliteration. */ + cc->__cd_in.__cd.__data[0].__trans = NULL; + + cc->__cd_out.__cd.__nsteps = 1; /* Only one step allowed. */ + cc->__cd_out.__cd.__steps = fcts.tomb; + + cc->__cd_out.__cd.__data[0].__invocation_counter = 0; + cc->__cd_out.__cd.__data[0].__internal_use = 1; + cc->__cd_out.__cd.__data[0].__flags = __GCONV_IS_LAST; + cc->__cd_out.__cd.__data[0].__statep = &fp->_wide_data->_IO_state; + + /* XXX For now no transliteration. */ + cc->__cd_out.__cd.__data[0].__trans = NULL; + } +#else +# ifdef _GLIBCPP_USE_WCHAR_T + { + /* Determine internal and external character sets. + + XXX For now we make our life easy: we assume a fixed internal + encoding (as most sane systems have; hi HP/UX!). If somebody + cares about systems which changing internal charsets they + should come up with a solution for the determination of the + currently used internal character set. */ + const char *internal_ccs = _G_INTERNAL_CCS; + const char *external_ccs = NULL; + +# ifdef HAVE_NL_LANGINFO + external_ccs = nl_langinfo (CODESET); +# endif + if (external_ccs == NULL) + external_ccs = "ISO-8859-1"; + + cc->__cd_in = iconv_open (internal_ccs, external_ccs); + if (cc->__cd_in != (iconv_t) -1) + cc->__cd_out = iconv_open (external_ccs, internal_ccs); + + if (cc->__cd_in != (iconv_t) -1 || cc->__cd_out != (iconv_t) -1) + /* XXX */ + abort (); + } +# else +# error "somehow determine this from LC_CTYPE" +# endif +#endif + + /* From now on use the wide character callback functions. */ + ((struct _IO_FILE_plus *) fp)->vtable = fp->_wide_data->_wide_vtable; + } + + /* Set the mode now. */ + fp->_mode = mode; + + _IO_funlockfile (fp); + _IO_cleanup_region_end (0); + + return mode; +} + +#ifdef weak_alias +weak_alias (_IO_fwide, fwide) +#endif + + +static enum __codecvt_result +do_out (struct _IO_codecvt *codecvt, __mbstate_t *statep, + const wchar_t *from_start, const wchar_t *from_end, + const wchar_t **from_stop, char *to_start, char *to_end, + char **to_stop) +{ + enum __codecvt_result result; + +#ifdef _LIBC + struct __gconv_step *gs = codecvt->__cd_out.__cd.__steps; + int status; + size_t dummy; + const unsigned char *from_start_copy = (unsigned char *) from_start; + + codecvt->__cd_out.__cd.__data[0].__outbuf = to_start; + codecvt->__cd_out.__cd.__data[0].__outbufend = to_end; + codecvt->__cd_out.__cd.__data[0].__statep = statep; + + status = DL_CALL_FCT (gs->__fct, + (gs, codecvt->__cd_out.__cd.__data, &from_start_copy, + (const unsigned char *) from_end, NULL, + &dummy, 0, 0)); + + *from_stop = (wchar_t *) from_start_copy; + *to_stop = codecvt->__cd_out.__cd.__data[0].__outbuf; + + switch (status) + { + case __GCONV_OK: + case __GCONV_EMPTY_INPUT: + result = __codecvt_ok; + break; + + case __GCONV_FULL_OUTPUT: + case __GCONV_INCOMPLETE_INPUT: + result = __codecvt_partial; + break; + + default: + result = __codecvt_error; + break; + } +#else +# ifdef _GLIBCPP_USE_WCHAR_T + size_t res; + const char *from_start_copy = (const char *) from_start; + size_t from_len = from_end - from_start; + char *to_start_copy = (char *) from_start; + size_t to_len = to_end - to_start; + + res = iconv (codecvt->__cd_out, &from_start_copy, &from_len, + &to_start_copy, &to_len); + + if (res == 0 || from_len == 0) + result = __codecvt_ok; + else if (to_len < codecvt->__codecvt_do_max_length (codecvt)) + result = __codecvt_partial; + else + result = __codecvt_error; +# else + /* Decide what to do. */ + result = __codecvt_error; +# endif +#endif + + return result; +} + + +static enum __codecvt_result +do_unshift (struct _IO_codecvt *codecvt, __mbstate_t *statep, + char *to_start, char *to_end, char **to_stop) +{ + enum __codecvt_result result; + +#ifdef _LIBC + struct __gconv_step *gs = codecvt->__cd_out.__cd.__steps; + int status; + size_t dummy; + + codecvt->__cd_out.__cd.__data[0].__outbuf = to_start; + codecvt->__cd_out.__cd.__data[0].__outbufend = to_end; + codecvt->__cd_out.__cd.__data[0].__statep = statep; + + status = DL_CALL_FCT (gs->__fct, + (gs, codecvt->__cd_out.__cd.__data, NULL, NULL, + NULL, &dummy, 1, 0)); + + *to_stop = codecvt->__cd_out.__cd.__data[0].__outbuf; + + switch (status) + { + case __GCONV_OK: + case __GCONV_EMPTY_INPUT: + result = __codecvt_ok; + break; + + case __GCONV_FULL_OUTPUT: + case __GCONV_INCOMPLETE_INPUT: + result = __codecvt_partial; + break; + + default: + result = __codecvt_error; + break; + } +#else +# ifdef _GLIBCPP_USE_WCHAR_T + size_t res; + char *to_start_copy = (char *) to_start; + size_t to_len = to_end - to_start; + + res = iconv (codecvt->__cd_out, NULL, NULL, &to_start_copy, &to_len); + + if (res == 0) + result = __codecvt_ok; + else if (to_len < codecvt->__codecvt_do_max_length (codecvt)) + result = __codecvt_partial; + else + result = __codecvt_error; +# else + /* Decide what to do. */ + result = __codecvt_error; +# endif +#endif + + return result; +} + + +static enum __codecvt_result +do_in (struct _IO_codecvt *codecvt, __mbstate_t *statep, + const char *from_start, const char *from_end, const char **from_stop, + wchar_t *to_start, wchar_t *to_end, wchar_t **to_stop) +{ + enum __codecvt_result result; + +#ifdef _LIBC + struct __gconv_step *gs = codecvt->__cd_in.__cd.__steps; + int status; + size_t dummy; + const unsigned char *from_start_copy = (unsigned char *) from_start; + + codecvt->__cd_in.__cd.__data[0].__outbuf = (char *) to_start; + codecvt->__cd_in.__cd.__data[0].__outbufend = (char *) to_end; + codecvt->__cd_in.__cd.__data[0].__statep = statep; + + status = DL_CALL_FCT (gs->__fct, + (gs, codecvt->__cd_in.__cd.__data, &from_start_copy, + from_end, NULL, &dummy, 0, 0)); + + *from_stop = from_start_copy; + *to_stop = (wchar_t *) codecvt->__cd_in.__cd.__data[0].__outbuf; + + switch (status) + { + case __GCONV_OK: + case __GCONV_EMPTY_INPUT: + result = __codecvt_ok; + break; + + case __GCONV_FULL_OUTPUT: + case __GCONV_INCOMPLETE_INPUT: + result = __codecvt_partial; + break; + + default: + result = __codecvt_error; + break; + } +#else +# ifdef _GLIBCPP_USE_WCHAR_T + size_t res; + const char *from_start_copy = (const char *) from_start; + size_t from_len = from_end - from_start; + char *to_start_copy = (char *) from_start; + size_t to_len = to_end - to_start; + + res = iconv (codecvt->__cd_in, &from_start_copy, &from_len, + &to_start_copy, &to_len); + + if (res == 0) + result = __codecvt_ok; + else if (to_len == 0) + result = __codecvt_partial; + else if (from_len < codecvt->__codecvt_do_max_length (codecvt)) + result = __codecvt_partial; + else + result = __codecvt_error; +# else + /* Decide what to do. */ + result = __codecvt_error; +# endif +#endif + + return result; +} + + +static int +do_encoding (struct _IO_codecvt *codecvt) +{ +#ifdef _LIBC + /* See whether the encoding is stateful. */ + if (codecvt->__cd_in.__cd.__steps[0].__stateful) + return -1; + /* Fortunately not. Now determine the input bytes for the conversion + necessary for each wide character. */ + if (codecvt->__cd_in.__cd.__steps[0].__min_needed_from + != codecvt->__cd_in.__cd.__steps[0].__max_needed_from) + /* Not a constant value. */ + return 0; + + return codecvt->__cd_in.__cd.__steps[0].__min_needed_from; +#else + /* Worst case scenario. */ + return -1; +#endif +} + + +static int +do_always_noconv (struct _IO_codecvt *codecvt) +{ + return 0; +} + + +static int +do_length (struct _IO_codecvt *codecvt, __mbstate_t *statep, + const char *from_start, const char *from_end, _IO_size_t max) +{ + int result; +#ifdef _LIBC + const unsigned char *cp = (const unsigned char *) from_start; + wchar_t to_buf[max]; + struct __gconv_step *gs = codecvt->__cd_in.__cd.__steps; + int status; + size_t dummy; + + codecvt->__cd_in.__cd.__data[0].__outbuf = (char *) to_buf; + codecvt->__cd_in.__cd.__data[0].__outbufend = (char *) &to_buf[max]; + codecvt->__cd_in.__cd.__data[0].__statep = statep; + + status = DL_CALL_FCT (gs->__fct, + (gs, codecvt->__cd_in.__cd.__data, &cp, from_end, + NULL, &dummy, 0, 0)); + + result = cp - (const unsigned char *) from_start; +#else +# ifdef _GLIBCPP_USE_WCHAR_T + const char *from_start_copy = (const char *) from_start; + size_t from_len = from_end - from_start; + wchar_t to_buf[max]; + size_t res; + char *to_start = (char *) to_buf; + + res = iconv (codecvt->__cd_in, &from_start_copy, &from_len, + &to_start, &max); + + result = from_start_copy - (char *) from_start; +# else + /* Decide what to do. */ + result = 0; +# endif +#endif + + return result; +} + + +static int +do_max_length (struct _IO_codecvt *codecvt) +{ +#ifdef _LIBC + return codecvt->__cd_in.__cd.__steps[0].__max_needed_from; +#else + return MB_CUR_MAX; +#endif +} diff --git a/libstdc++-v3/libio/iolibio.h b/libstdc++-v3/libio/iolibio.h index 083b198b4485..92f25cf9f9dd 100644 --- a/libstdc++-v3/libio/iolibio.h +++ b/libstdc++-v3/libio/iolibio.h @@ -8,14 +8,23 @@ extern "C" { #endif extern int _IO_fclose __P((_IO_FILE*)); +extern int _IO_new_fclose __P((_IO_FILE*)); +extern int _IO_old_fclose __P((_IO_FILE*)); extern _IO_FILE *_IO_fdopen __P((int, const char*)); +extern _IO_FILE *_IO_old_fdopen __P((int, const char*)); +extern _IO_FILE *_IO_new_fdopen __P((int, const char*)); extern int _IO_fflush __P((_IO_FILE*)); extern int _IO_fgetpos __P((_IO_FILE*, _IO_fpos_t*)); +extern int _IO_fgetpos64 __P((_IO_FILE*, _IO_fpos64_t*)); extern char* _IO_fgets __P((char*, int, _IO_FILE*)); extern _IO_FILE *_IO_fopen __P((const char*, const char*)); +extern _IO_FILE *_IO_old_fopen __P((const char*, const char*)); +extern _IO_FILE *_IO_new_fopen __P((const char*, const char*)); +extern _IO_FILE *_IO_fopen64 __P((const char*, const char*)); extern int _IO_fprintf __P((_IO_FILE*, const char*, ...)); extern int _IO_fputs __P((const char*, _IO_FILE*)); extern int _IO_fsetpos __P((_IO_FILE*, const _IO_fpos_t *)); +extern int _IO_fsetpos64 __P((_IO_FILE*, const _IO_fpos64_t *)); extern long int _IO_ftell __P((_IO_FILE*)); extern _IO_size_t _IO_fread __P((void*, _IO_size_t, _IO_size_t, _IO_FILE*)); extern _IO_size_t _IO_fwrite __P((const void*, @@ -32,32 +41,40 @@ extern int _IO_sprintf __P((char *, const char*, ...)); extern int _IO_ungetc __P((int, _IO_FILE*)); extern int _IO_vsscanf __P((const char *, const char *, _IO_va_list)); extern int _IO_vsprintf __P((char*, const char*, _IO_va_list)); +extern int _IO_vswprintf __P((wchar_t*, _IO_size_t, const wchar_t*, + _IO_va_list)); struct obstack; extern int _IO_obstack_vprintf __P ((struct obstack *, const char *, - _IO_va_list)); + _IO_va_list)); extern int _IO_obstack_printf __P ((struct obstack *, const char *, ...)); #ifndef _IO_pos_BAD -#define _IO_pos_BAD ((_IO_fpos_t)(-1)) +#define _IO_pos_BAD ((_IO_off64_t)(-1)) #endif #define _IO_clearerr(FP) ((FP)->_flags &= ~(_IO_ERR_SEEN|_IO_EOF_SEEN)) #define _IO_fseek(__fp, __offset, __whence) \ (_IO_seekoff(__fp, __offset, __whence, _IOS_INPUT|_IOS_OUTPUT) == _IO_pos_BAD ? EOF : 0) #define _IO_rewind(FILE) (void)_IO_seekoff(FILE, 0, 0, _IOS_INPUT|_IOS_OUTPUT) #define _IO_vprintf(FORMAT, ARGS) _IO_vfprintf(_IO_stdout, FORMAT, ARGS) -#if _G_IO_IO_FILE_VERSION == 0x20001 #define _IO_freopen(FILENAME, MODE, FP) \ (_IO_file_close_it(FP), _IO_file_fopen(FP, FILENAME, MODE, 0)) -#else -#define _IO_freopen(FILENAME, MODE, FP) \ - (_IO_file_close_it(FP), _IO_file_fopen(FP, FILENAME, MODE)) -#endif +#define _IO_old_freopen(FILENAME, MODE, FP) \ + (_IO_old_file_close_it (FP), _IO_old_file_fopen(FP, FILENAME, MODE)) +#define _IO_freopen64(FILENAME, MODE, FP) \ + (_IO_file_close_it(FP), _IO_file_fopen(FP, FILENAME, MODE, 1)) #define _IO_fileno(FP) ((FP)->_fileno) extern _IO_FILE* _IO_popen __P((const char*, const char*)); +extern _IO_FILE* _IO_new_popen __P((const char*, const char*)); +extern _IO_FILE* _IO_old_popen __P((const char*, const char*)); +extern int __new_pclose __P((_IO_FILE *)); +extern int __old_pclose __P((_IO_FILE *)); #define _IO_pclose _IO_fclose #define _IO_setbuf(_FP, _BUF) _IO_setbuffer(_FP, _BUF, _IO_BUFSIZ) #define _IO_setlinebuf(_FP) _IO_setvbuf(_FP, NULL, 1, 0) +_IO_FILE *__new_freopen __P ((const char *, const char *, _IO_FILE *)); +_IO_FILE *__old_freopen __P ((const char *, const char *, _IO_FILE *)); + #ifdef __cplusplus } #endif diff --git a/libstdc++-v3/libio/libio.h b/libstdc++-v3/libio/libio.h index 1bc57b2fcc74..409da88eb756 100644 --- a/libstdc++-v3/libio/libio.h +++ b/libstdc++-v3/libio/libio.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 92, 93, 94, 95, 97, 98 Free Software Foundation, Inc. +/* Copyright (C) 1991,92,93,94,95,97,98,99,2000 Free Software Foundation, Inc. This file is part of the GNU IO Library. Written by Per Bothner . @@ -28,21 +28,22 @@ #define _IO_STDIO_H #include <_G_config.h> +/* ALL of these should be defined in _G_config.h */ #define _IO_pos_t _G_fpos_t /* obsolete */ #define _IO_fpos_t _G_fpos_t +#define _IO_fpos64_t _G_fpos64_t #define _IO_size_t _G_size_t #define _IO_ssize_t _G_ssize_t #define _IO_off_t _G_off_t +#define _IO_off64_t _G_off64_t #define _IO_pid_t _G_pid_t #define _IO_uid_t _G_uid_t +#define _IO_iconv_t _G_iconv_t #define _IO_HAVE_SYS_WAIT _G_HAVE_SYS_WAIT #define _IO_HAVE_ST_BLKSIZE _G_HAVE_ST_BLKSIZE #define _IO_BUFSIZ _G_BUFSIZ #define _IO_va_list _G_va_list -#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001 -#define _IO_fpos64_t _G_fpos64_t -#define _IO_off64_t _G_off64_t -#endif +#define _IO_wint_t _G_wint_t #ifdef _G_NEED_STDARG_H /* This define avoids name pollution if we're using GNU stdarg.h */ @@ -60,30 +61,26 @@ # else # ifdef __STDC__ # define __P(p) p +# define __PMT(p) p # else # define __P(p) () +# define __PMT(p) () # endif # endif #endif /*!__P*/ -#ifndef __PMT -# ifdef __STDC__ -# define __PMT(p) p -# else -# define __PMT(p) () -# endif -#endif /*!__P*/ - /* For backward compatibility */ #ifndef _PARAMS # define _PARAMS(protos) __P(protos) #endif /*!_PARAMS*/ #ifndef __STDC__ -# define const +# ifndef const +# define const +# endif #endif #define _IO_UNIFIED_JUMPTABLES 1 -#if !_G_HAVE_PRINTF_FP +#ifndef _G_HAVE_PRINTF_FP # define _IO_USE_DTOA 1 #endif @@ -162,28 +159,12 @@ struct _IO_jump_t; struct _IO_FILE; /* Handle lock. */ #ifdef _IO_MTSAFE_IO # if defined __GLIBC__ && __GLIBC__ >= 2 -# if __GLIBC_MINOR__ > 0 -# include -# else -# include -# endif -# define _IO_LOCK_T _IO_lock_t * +# include # else /*# include */ # endif #else -# if defined(__GLIBC__) && __GLIBC__ >= 2 - typedef void _IO_lock_t; -# define _IO_LOCK_T void * -# else -# ifdef __linux__ - struct _IO_lock_t { void *ptr; short int field1; short int field2; }; -# define _IO_LOCK_T struct _IO_lock_t -# else - typedef void _IO_lock_t; -# define _IO_LOCK_T void * -# endif -# endif +typedef void _IO_lock_t; #endif @@ -208,6 +189,78 @@ struct _IO_marker { #endif }; +/* This is the structure from the libstdc++ codecvt class. */ +enum __codecvt_result +{ + __codecvt_ok, + __codecvt_partial, + __codecvt_error, + __codecvt_noconv +}; + +#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T +/* The order of the elements in the following struct must match the order + of the virtual functions in the libstdc++ codecvt class. */ +struct _IO_codecvt +{ + void (*__codecvt_destr) (struct _IO_codecvt *); + enum __codecvt_result (*__codecvt_do_out) (struct _IO_codecvt *, + __mbstate_t *, + const wchar_t *, + const wchar_t *, + const wchar_t **, char *, + char *, char **); + enum __codecvt_result (*__codecvt_do_unshift) (struct _IO_codecvt *, + __mbstate_t *, char *, + char *, char **); + enum __codecvt_result (*__codecvt_do_in) (struct _IO_codecvt *, + __mbstate_t *, + const char *, const char *, + const char **, wchar_t *, + wchar_t *, wchar_t **); + int (*__codecvt_do_encoding) (struct _IO_codecvt *); + int (*__codecvt_do_always_noconv) (struct _IO_codecvt *); + int (*__codecvt_do_length) (struct _IO_codecvt *, __mbstate_t *, + const char *, const char *, _IO_size_t); + int (*__codecvt_do_max_length) (struct _IO_codecvt *); + + _IO_iconv_t __cd_in; + _IO_iconv_t __cd_out; +}; +#endif + +/* Extra data for wide character streams. */ +struct _IO_wide_data +{ + wchar_t *_IO_read_ptr; /* Current read pointer */ + wchar_t *_IO_read_end; /* End of get area. */ + wchar_t *_IO_read_base; /* Start of putback+get area. */ + wchar_t *_IO_write_base; /* Start of put area. */ + wchar_t *_IO_write_ptr; /* Current put pointer. */ + wchar_t *_IO_write_end; /* End of put area. */ + wchar_t *_IO_buf_base; /* Start of reserve area. */ + wchar_t *_IO_buf_end; /* End of reserve area. */ + /* The following fields are used to support backing up and undo. */ + wchar_t *_IO_save_base; /* Pointer to start of non-current get area. */ + wchar_t *_IO_backup_base; /* Pointer to first valid character of + backup area */ + wchar_t *_IO_save_end; /* Pointer to end of non-current get area. */ + +#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T + __mbstate_t _IO_state; + __mbstate_t _IO_last_state; + struct _IO_codecvt _codecvt; +#endif + + wchar_t _shortbuf[1]; + +#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T + struct _IO_jump_t *_wide_vtable; +#endif +}; + +struct _IO_FILE_plus; + struct _IO_FILE { int _flags; /* High-order word is _IO_MAGIC; rest is flags. */ #define _IO_file_flags _flags @@ -229,30 +282,38 @@ struct _IO_FILE { struct _IO_marker *_markers; - struct _IO_FILE *_chain; + struct _IO_FILE_plus *_chain; int _fileno; int _blksize; -#ifdef _G_IO_IO_FILE_VERSION - _IO_off_t _old_offset; -#else - _IO_off_t _offset; -#endif + _IO_off_t _old_offset; /* This used to be _offset but it's too small. */ #define __HAVE_COLUMN /* temporary */ /* 1+column number of pbase(); 0 is unknown. */ unsigned short _cur_column; - char _unused; + signed char _vtable_offset; char _shortbuf[1]; /* char* _save_gptr; char* _save_egptr; */ -#ifdef _IO_LOCK_T - _IO_LOCK_T _lock; + _IO_lock_t *_lock; +#ifdef _IO_USE_OLD_IO_FILE +}; + +struct _IO_FILE_complete +{ + struct _IO_FILE _file; #endif -#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001 +#if defined _G_IO_IO_FILE_VERSION && _G_IO_IO_FILE_VERSION == 0x20001 _IO_off64_t _offset; - int _unused2[16]; /* Make sure we don't get into trouble again. */ +# if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T + /* Wide character stream stuff. */ + struct _IO_codecvt *_codecvt; + struct _IO_wide_data *_wide_data; +# endif + int _mode; + /* Make sure we don't get into trouble again. */ + char _unused2[15 * sizeof (int) - 2 * sizeof (void *)]; #endif }; @@ -260,45 +321,82 @@ struct _IO_FILE { typedef struct _IO_FILE _IO_FILE; #endif -#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001 -#define _IO_stdin_ _IO_2_1_stdin_ -#define _IO_stdout_ _IO_2_1_stdout_ -#define _IO_stderr_ _IO_2_1_stderr_ +extern struct _IO_FILE_plus _IO_2_1_stdin_; +extern struct _IO_FILE_plus _IO_2_1_stdout_; +extern struct _IO_FILE_plus _IO_2_1_stderr_; +#ifndef _LIBC +#define _IO_stdin ((_IO_FILE*)(&_IO_2_1_stdin_)) +#define _IO_stdout ((_IO_FILE*)(&_IO_2_1_stdout_)) +#define _IO_stderr ((_IO_FILE*)(&_IO_2_1_stderr_)) +#else +extern _IO_FILE *_IO_stdin; +extern _IO_FILE *_IO_stdout; +extern _IO_FILE *_IO_stderr; #endif -struct _IO_FILE_plus; -extern struct _IO_FILE_plus _IO_stdin_, _IO_stdout_, _IO_stderr_; -#define _IO_stdin ((_IO_FILE*)(&_IO_stdin_)) -#define _IO_stdout ((_IO_FILE*)(&_IO_stdout_)) -#define _IO_stderr ((_IO_FILE*)(&_IO_stderr_)) + +/* Functions to do I/O and file management for a stream. */ + +/* Read NBYTES bytes from COOKIE into a buffer pointed to by BUF. + Return number of bytes read. */ +typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes); + +/* Write N bytes pointed to by BUF to COOKIE. Write all N bytes + unless there is an error. Return number of bytes written, or -1 if + there is an error without writing anything. If the file has been + opened for append (__mode.__append set), then set the file pointer + to the end of the file and then do the write; if not, just write at + the current file pointer. */ +typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf, + size_t __n); + +/* Move COOKIE's file position to *POS bytes from the + beginning of the file (if W is SEEK_SET), + the current position (if W is SEEK_CUR), + or the end of the file (if W is SEEK_END). + Set *POS to the new file position. + Returns zero if successful, nonzero if not. */ +typedef int __io_seek_fn (void *__cookie, _IO_off64_t *__pos, int __w); + +/* Close COOKIE. */ +typedef int __io_close_fn (void *__cookie); -/* Define the user-visible type, with user-friendly member names. */ +#ifdef _GNU_SOURCE +/* User-visible names for the above. */ +typedef __io_read_fn cookie_read_function_t; +typedef __io_write_fn cookie_write_function_t; +typedef __io_seek_fn cookie_seek_function_t; +typedef __io_close_fn cookie_close_function_t; + +/* The structure with the cookie function pointers. */ typedef struct { - _IO_ssize_t (*read) __PMT ((struct _IO_FILE *, void *, _IO_ssize_t)); - _IO_ssize_t (*write) __PMT ((struct _IO_FILE *, const void *, _IO_ssize_t)); - _IO_off_t (*seek) __PMT ((struct _IO_FILE *, _IO_off_t, int)); - int (*close) __PMT ((struct _IO_FILE *)); + __io_read_fn *read; /* Read bytes. */ + __io_write_fn *write; /* Write bytes. */ + __io_seek_fn *seek; /* Seek/tell file position. */ + __io_close_fn *close; /* Close file. */ } _IO_cookie_io_functions_t; +typedef _IO_cookie_io_functions_t cookie_io_functions_t; -/* Special file type for fopencookie function. */ -struct _IO_cookie_file -{ - struct _IO_FILE file; - const void *vtable; - void *cookie; - _IO_cookie_io_functions_t io_functions; -}; +struct _IO_cookie_file; + +/* Initialize one of those. */ +extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write, + void *__cookie, _IO_cookie_io_functions_t __fns); +#endif #ifdef __cplusplus extern "C" { #endif -extern int __underflow __P ((_IO_FILE *)); -extern int __uflow __P ((_IO_FILE *)); -extern int __overflow __P ((_IO_FILE *, int)); +extern int __underflow (_IO_FILE *) __THROW; +extern int __uflow (_IO_FILE *) __THROW; +extern int __overflow (_IO_FILE *, int) __THROW; +extern _IO_wint_t __wunderflow (_IO_FILE *) __THROW; +extern _IO_wint_t __wuflow (_IO_FILE *) __THROW; +extern _IO_wint_t __woverflow (_IO_FILE *, _IO_wint_t) __THROW; #define _IO_getc_unlocked(_fp) \ ((_fp)->_IO_read_ptr >= (_fp)->_IO_read_end ? __uflow (_fp) \ @@ -307,29 +405,36 @@ extern int __overflow __P ((_IO_FILE *, int)); ((_fp)->_IO_read_ptr >= (_fp)->_IO_read_end \ && __underflow (_fp) == EOF ? EOF \ : *(unsigned char *) (_fp)->_IO_read_ptr) - #define _IO_putc_unlocked(_ch, _fp) \ (((_fp)->_IO_write_ptr >= (_fp)->_IO_write_end) \ ? __overflow (_fp, (unsigned char) (_ch)) \ : (unsigned char) (*(_fp)->_IO_write_ptr++ = (_ch))) +#define _IO_getwc_unlocked(_fp) \ + ((_fp)->_wide_data->_IO_read_ptr >= (_fp)->_wide_data->_IO_read_end \ + ? __wuflow (_fp) : (_IO_wint_t) *(_fp)->_wide_data->_IO_read_ptr++) +#define _IO_putwc_unlocked(_wch, _fp) \ + ((_fp)->_wide_data->_IO_write_ptr >= (_fp)->_wide_data->_IO_write_end \ + ? __woverflow (_fp, _wch) \ + : (_IO_wint_t) (*(_fp)->_wide_data->_IO_write_ptr++ = (_wch))) + #define _IO_feof_unlocked(__fp) (((__fp)->_flags & _IO_EOF_SEEN) != 0) #define _IO_ferror_unlocked(__fp) (((__fp)->_flags & _IO_ERR_SEEN) != 0) -extern int _IO_getc __P ((_IO_FILE *__fp)); -extern int _IO_putc __P ((int __c, _IO_FILE *__fp)); -extern int _IO_feof __P ((_IO_FILE *__fp)); -extern int _IO_ferror __P ((_IO_FILE *__fp)); +extern int _IO_getc (_IO_FILE *__fp) __THROW; +extern int _IO_putc (int __c, _IO_FILE *__fp) __THROW; +extern int _IO_feof (_IO_FILE *__fp) __THROW; +extern int _IO_ferror (_IO_FILE *__fp) __THROW; -extern int _IO_peekc_locked __P ((_IO_FILE *__fp)); +extern int _IO_peekc_locked (_IO_FILE *__fp) __THROW; /* This one is for Emacs. */ #define _IO_PENDING_OUTPUT_COUNT(_fp) \ ((_fp)->_IO_write_ptr - (_fp)->_IO_write_base) -extern void _IO_flockfile __P ((_IO_FILE *)); -extern void _IO_funlockfile __P ((_IO_FILE *)); -extern int _IO_ftrylockfile __P ((_IO_FILE *)); +extern void _IO_flockfile (_IO_FILE *) __THROW; +extern void _IO_funlockfile (_IO_FILE *) __THROW; +extern int _IO_ftrylockfile (_IO_FILE *) __THROW; #ifdef _IO_MTSAFE_IO # define _IO_peekc(_fp) _IO_peekc_locked (_fp) @@ -342,24 +447,51 @@ extern int _IO_ftrylockfile __P ((_IO_FILE *)); # define _IO_cleanup_region_end(_Doit) /**/ #endif /* !_IO_MTSAFE_IO */ +extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, + _IO_va_list, int *__restrict) __THROW; +extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, + _IO_va_list) __THROW; +extern _IO_ssize_t _IO_padn (_IO_FILE *, int, _IO_ssize_t) __THROW; +extern _IO_size_t _IO_sgetn (_IO_FILE *, void *, _IO_size_t) __THROW; -extern int _IO_vfscanf __P ((_IO_FILE *, const char *, _IO_va_list, int *)); -extern int _IO_vfprintf __P ((_IO_FILE *, const char *, _IO_va_list)); -extern _IO_ssize_t _IO_padn __P ((_IO_FILE *, int, _IO_ssize_t)); -extern _IO_size_t _IO_sgetn __P ((_IO_FILE *, void *, _IO_size_t)); +extern _IO_off64_t _IO_seekoff (_IO_FILE *, _IO_off64_t, int, int) __THROW; +extern _IO_off64_t _IO_seekpos (_IO_FILE *, _IO_off64_t, int) __THROW; -#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001 -extern _IO_off64_t _IO_seekoff __P ((_IO_FILE *, _IO_off64_t, int, int)); -extern _IO_off64_t _IO_seekpos __P ((_IO_FILE *, _IO_off64_t, int)); -#else -extern _IO_off_t _IO_seekoff __P ((_IO_FILE *, _IO_off_t, int, int)); -extern _IO_off_t _IO_seekpos __P ((_IO_FILE *, _IO_off_t, int)); +extern void _IO_free_backup_area (_IO_FILE *) __THROW; + +#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T +extern _IO_wint_t _IO_getwc (_IO_FILE *__fp) __THROW; +extern _IO_wint_t _IO_putwc (wchar_t __wc, _IO_FILE *__fp) __THROW; +extern int _IO_fwide (_IO_FILE *__fp, int __mode) __THROW; +# if __GNUC__ >= 2 +/* A special optimized version of the function above. It optimizes the + case of initializing an unoriented byte stream. */ +# define _IO_fwide(__fp, __mode) \ + ({ int __result = (__mode); \ + if (__result < 0) \ + { \ + if ((__fp)->_mode == 0) \ + /* We know that all we have to do is to set the flag. */ \ + (__fp)->_mode = -1; \ + __result = (__fp)->_mode; \ + } \ + else \ + __result = _IO_fwide (__fp, __result); \ + __result; }) +# endif + +extern int _IO_vfwscanf (_IO_FILE * __restrict, const wchar_t * __restrict, + _IO_va_list, int *__restrict) __THROW; +extern int _IO_vfwprintf (_IO_FILE *__restrict, const wchar_t *__restrict, + _IO_va_list) __THROW; +extern _IO_ssize_t _IO_wpadn (_IO_FILE *, wint_t, _IO_ssize_t) __THROW; +extern void _IO_free_wbackup_area (_IO_FILE *) __THROW; #endif -extern void _IO_free_backup_area __P ((_IO_FILE *)); - #ifdef __cplusplus } #endif #endif /* _IO_STDIO_H */ + + diff --git a/libstdc++-v3/libio/libioP.h b/libstdc++-v3/libio/libioP.h index f002097ceaab..a9681a3ec5d7 100644 --- a/libstdc++-v3/libio/libioP.h +++ b/libstdc++-v3/libio/libioP.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU IO Library. This library is free software; you can redistribute it and/or @@ -23,25 +23,14 @@ other reasons why the executable file might be covered by the GNU General Public License. */ -#ifndef _POSIX_SOURCE -# define _POSIX_SOURCE -#endif - #include #ifndef __set_errno # define __set_errno(Val) errno = (Val) #endif - -#ifdef _IO_MTSAFE_IO -# if defined __GLIBC__ && __GLIBC__ >= 2 -# if __GLIBC_MINOR__ > 0 -# include -# else -# include -# endif -# else +#if defined __GLIBC__ && __GLIBC__ >= 2 +# include +#else /*# include */ -# endif #endif #include "iolibio.h" @@ -75,37 +64,65 @@ extern "C" { * object being acted on (i.e. the 'this' parameter). */ +#if (!defined _IO_USE_OLD_IO_FILE \ + && (!defined _G_IO_NO_BACKWARD_COMPAT || _G_IO_NO_BACKWARD_COMPAT == 0)) +# define _IO_JUMPS_OFFSET 1 +#endif + #define _IO_JUMPS(THIS) ((struct _IO_FILE_plus *) (THIS))->vtable +#define _IO_WIDE_JUMPS(THIS) ((struct _IO_FILE *) (THIS))->_wide_data->_wide_vtable +#define _IO_CHECK_WIDE(THIS) (((struct _IO_FILE *) (THIS))->_wide_data != NULL) + +#if _IO_JUMPS_OFFSET +# define _IO_JUMPS_FUNC(THIS) \ + (*(struct _IO_jump_t **) ((char *) &_IO_JUMPS ((struct _IO_FILE_plus *) (THIS)) \ + + (THIS)->_vtable_offset)) +#else +# define _IO_JUMPS_FUNC(THIS) _IO_JUMPS ((struct _IO_FILE_plus *) (THIS)) +#endif +#define _IO_WIDE_JUMPS_FUNC(THIS) _IO_WIDE_JUMPS(THIS) #ifdef _G_USING_THUNKS # define JUMP_FIELD(TYPE, NAME) TYPE NAME -# define JUMP0(FUNC, THIS) _IO_JUMPS(THIS)->FUNC (THIS) -# define JUMP1(FUNC, THIS, X1) _IO_JUMPS(THIS)->FUNC (THIS, X1) -# define JUMP2(FUNC, THIS, X1, X2) _IO_JUMPS(THIS)->FUNC (THIS, X1, X2) -# define JUMP3(FUNC, THIS, X1,X2,X3) _IO_JUMPS(THIS)->FUNC (THIS, X1,X2, X3) +# define JUMP0(FUNC, THIS) _IO_JUMPS_FUNC(THIS)->FUNC (THIS) +# define JUMP1(FUNC, THIS, X1) _IO_JUMPS_FUNC(THIS)->FUNC (THIS, X1) +# define JUMP2(FUNC, THIS, X1, X2) _IO_JUMPS_FUNC(THIS)->FUNC (THIS, X1, X2) +# define JUMP3(FUNC, THIS, X1,X2,X3) _IO_JUMPS_FUNC(THIS)->FUNC (THIS, X1,X2, X3) # define JUMP_INIT(NAME, VALUE) VALUE # define JUMP_INIT_DUMMY JUMP_INIT(dummy, 0), JUMP_INIT (dummy2, 0) + +# define WJUMP0(FUNC, THIS) _IO_WIDE_JUMPS_FUNC(THIS)->FUNC (THIS) +# define WJUMP1(FUNC, THIS, X1) _IO_WIDE_JUMPS_FUNC(THIS)->FUNC (THIS, X1) +# define WJUMP2(FUNC, THIS, X1, X2) _IO_WIDE_JUMPS_FUNC(THIS)->FUNC (THIS, X1, X2) +# define WJUMP3(FUNC, THIS, X1,X2,X3) _IO_WIDE_JUMPS_FUNC(THIS)->FUNC (THIS, X1,X2, X3) #else /* These macros will change when we re-implement vtables to use "thunks"! */ # define JUMP_FIELD(TYPE, NAME) struct { short delta1, delta2; TYPE pfn; } NAME -# define JUMP0(FUNC, THIS) _IO_JUMPS(THIS)->FUNC.pfn (THIS) -# define JUMP1(FUNC, THIS, X1) _IO_JUMPS(THIS)->FUNC.pfn (THIS, X1) -# define JUMP2(FUNC, THIS, X1, X2) _IO_JUMPS(THIS)->FUNC.pfn (THIS, X1, X2) -# define JUMP3(FUNC, THIS, X1,X2,X3) _IO_JUMPS(THIS)->FUNC.pfn (THIS, X1,X2,X3) +# define JUMP0(FUNC, THIS) _IO_JUMPS_FUNC(THIS)->FUNC.pfn (THIS) +# define JUMP1(FUNC, THIS, X1) _IO_JUMPS_FUNC(THIS)->FUNC.pfn (THIS, X1) +# define JUMP2(FUNC, THIS, X1, X2) _IO_JUMPS_FUNC(THIS)->FUNC.pfn (THIS, X1, X2) +# define JUMP3(FUNC, THIS, X1,X2,X3) _IO_JUMPS_FUNC(THIS)->FUNC.pfn (THIS, X1,X2,X3) # define JUMP_INIT(NAME, VALUE) {0, 0, VALUE} # define JUMP_INIT_DUMMY JUMP_INIT(dummy, 0) + +# define WJUMP0(FUNC, THIS) _IO_WIDE_JUMPS_FUNC(THIS)->FUNC.pfn (THIS) +# define WJUMP1(FUNC, THIS, X1) _IO_WIDE_JUMPS_FUNC(THIS)->FUNC.pfn (THIS, X1) +# define WJUMP2(FUNC, THIS, X1, X2) _IO_WIDE_JUMPS_FUNC(THIS)->FUNC.pfn (THIS, X1, X2) +# define WJUMP3(FUNC, THIS, X1,X2,X3) _IO_WIDE_JUMPS_FUNC(THIS)->FUNC.pfn (THIS, X1,X2,X3) #endif /* The 'finish' function does any final cleaning up of an _IO_FILE object. - It does not delete (free) it, but does everything else to finalize it/ + It does not delete (free) it, but does everything else to finalize it. It matches the streambuf::~streambuf virtual destructor. */ typedef void (*_IO_finish_t) __PMT ((_IO_FILE *, int)); /* finalize */ #define _IO_FINISH(FP) JUMP1 (__finish, FP, 0) +#define _IO_WFINISH(FP) WJUMP1 (__finish, FP, 0) /* The 'overflow' hook flushes the buffer. The second argument is a character, or EOF. It matches the streambuf::overflow virtual function. */ typedef int (*_IO_overflow_t) __PMT ((_IO_FILE *, int)); #define _IO_OVERFLOW(FP, CH) JUMP1 (__overflow, FP, CH) +#define _IO_WOVERFLOW(FP, CH) WJUMP1 (__overflow, FP, CH) /* The 'underflow' hook tries to fills the get buffer. It returns the next character (as an unsigned char) or EOF. The next @@ -113,6 +130,7 @@ typedef int (*_IO_overflow_t) __PMT ((_IO_FILE *, int)); It matches the streambuf::underflow virtual function. */ typedef int (*_IO_underflow_t) __PMT ((_IO_FILE *)); #define _IO_UNDERFLOW(FP) JUMP0 (__underflow, FP) +#define _IO_WUNDERFLOW(FP) WJUMP0 (__underflow, FP) /* The 'uflow' hook returns the next character in the input stream (cast to unsigned char), and increments the read position; @@ -120,68 +138,68 @@ typedef int (*_IO_underflow_t) __PMT ((_IO_FILE *)); It matches the streambuf::uflow virtual function, which is not in the cfront implementation, but was added to C++ by the ANSI/ISO committee. */ #define _IO_UFLOW(FP) JUMP0 (__uflow, FP) +#define _IO_WUFLOW(FP) WJUMP0 (__uflow, FP) /* The 'pbackfail' hook handles backing up. It matches the streambuf::pbackfail virtual function. */ typedef int (*_IO_pbackfail_t) __PMT ((_IO_FILE *, int)); #define _IO_PBACKFAIL(FP, CH) JUMP1 (__pbackfail, FP, CH) +#define _IO_WPBACKFAIL(FP, CH) WJUMP1 (__pbackfail, FP, CH) /* The 'xsputn' hook writes upto N characters from buffer DATA. Returns the number of character actually written. It matches the streambuf::xsputn virtual function. */ typedef _IO_size_t (*_IO_xsputn_t) __PMT ((_IO_FILE *FP, const void *DATA, - _IO_size_t N)); + _IO_size_t N)); #define _IO_XSPUTN(FP, DATA, N) JUMP2 (__xsputn, FP, DATA, N) +#define _IO_WXSPUTN(FP, DATA, N) WJUMP2 (__xsputn, FP, DATA, N) /* The 'xsgetn' hook reads upto N characters into buffer DATA. Returns the number of character actually read. It matches the streambuf::xsgetn virtual function. */ typedef _IO_size_t (*_IO_xsgetn_t) __PMT ((_IO_FILE *FP, void *DATA, - _IO_size_t N)); + _IO_size_t N)); #define _IO_XSGETN(FP, DATA, N) JUMP2 (__xsgetn, FP, DATA, N) +#define _IO_WXSGETN(FP, DATA, N) WJUMP2 (__xsgetn, FP, DATA, N) /* The 'seekoff' hook moves the stream position to a new position relative to the start of the file (if DIR==0), the current position (MODE==1), or the end of the file (MODE==2). It matches the streambuf::seekoff virtual function. It is also used for the ANSI fseek function. */ -#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001 typedef _IO_off64_t (*_IO_seekoff_t) __PMT ((_IO_FILE *FP, _IO_off64_t OFF, - int DIR, int MODE)); -#else -typedef _IO_off_t (*_IO_seekoff_t) __PMT ((_IO_FILE *FP, _IO_off_t OFF, - int DIR, int MODE)); -#endif + int DIR, int MODE)); #define _IO_SEEKOFF(FP, OFF, DIR, MODE) JUMP3 (__seekoff, FP, OFF, DIR, MODE) +#define _IO_WSEEKOFF(FP, OFF, DIR, MODE) WJUMP3 (__seekoff, FP, OFF, DIR, MODE) /* The 'seekpos' hook also moves the stream position, - but to an absolute position given by a fpos_t (seekpos). + but to an absolute position given by a fpos64_t (seekpos). It matches the streambuf::seekpos virtual function. It is also used for the ANSI fgetpos and fsetpos functions. */ /* The _IO_seek_cur and _IO_seek_end options are not allowed. */ -#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001 typedef _IO_off64_t (*_IO_seekpos_t) __PMT ((_IO_FILE *, _IO_off64_t, int)); -#else -typedef _IO_off_t (*_IO_seekpos_t) __PMT ((_IO_FILE *, _IO_off_t, int)); -#endif #define _IO_SEEKPOS(FP, POS, FLAGS) JUMP2 (__seekpos, FP, POS, FLAGS) +#define _IO_WSEEKPOS(FP, POS, FLAGS) WJUMP2 (__seekpos, FP, POS, FLAGS) /* The 'setbuf' hook gives a buffer to the file. It matches the streambuf::setbuf virtual function. */ typedef _IO_FILE* (*_IO_setbuf_t) __PMT ((_IO_FILE *, char *, _IO_ssize_t)); #define _IO_SETBUF(FP, BUFFER, LENGTH) JUMP2 (__setbuf, FP, BUFFER, LENGTH) +#define _IO_WSETBUF(FP, BUFFER, LENGTH) WJUMP2 (__setbuf, FP, BUFFER, LENGTH) /* The 'sync' hook attempts to synchronize the internal data structures of the file with the external state. It matches the streambuf::sync virtual function. */ typedef int (*_IO_sync_t) __PMT ((_IO_FILE *)); #define _IO_SYNC(FP) JUMP0 (__sync, FP) +#define _IO_WSYNC(FP) WJUMP0 (__sync, FP) /* The 'doallocate' hook is used to tell the file to allocate a buffer. It matches the streambuf::doallocate virtual function, which is not in the ANSI/ISO C++ standard, but is part traditional implementations. */ typedef int (*_IO_doallocate_t) __PMT ((_IO_FILE *)); #define _IO_DOALLOCATE(FP) JUMP0 (__doallocate, FP) +#define _IO_WDOALLOCATE(FP) WJUMP0 (__doallocate, FP) /* The following four hooks (sysread, syswrite, sysclose, sysseek, and sysstat) are low-level hooks specific to this implementation. @@ -200,24 +218,24 @@ typedef int (*_IO_doallocate_t) __PMT ((_IO_FILE *)); specific to this implementation. */ typedef _IO_ssize_t (*_IO_read_t) __PMT ((_IO_FILE *, void *, _IO_ssize_t)); #define _IO_SYSREAD(FP, DATA, LEN) JUMP2 (__read, FP, DATA, LEN) +#define _IO_WSYSREAD(FP, DATA, LEN) WJUMP2 (__read, FP, DATA, LEN) /* The 'syswrite' hook is used to write data from an existing buffer to an external file. It generalizes the Unix write(2) function. It matches the streambuf::sys_write virtual function, which is specific to this implementation. */ -typedef _IO_ssize_t (*_IO_write_t) __PMT ((_IO_FILE *,const void *,_IO_ssize_t)); +typedef _IO_ssize_t (*_IO_write_t) __PMT ((_IO_FILE *, const void *, + _IO_ssize_t)); #define _IO_SYSWRITE(FP, DATA, LEN) JUMP2 (__write, FP, DATA, LEN) +#define _IO_WSYSWRITE(FP, DATA, LEN) WJUMP2 (__write, FP, DATA, LEN) /* The 'sysseek' hook is used to re-position an external file. It generalizes the Unix lseek(2) function. It matches the streambuf::sys_seek virtual function, which is specific to this implementation. */ -#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001 typedef _IO_off64_t (*_IO_seek_t) __PMT ((_IO_FILE *, _IO_off64_t, int)); -#else -typedef _IO_off_t (*_IO_seek_t) __PMT ((_IO_FILE *, _IO_off_t, int)); -#endif #define _IO_SYSSEEK(FP, OFFSET, MODE) JUMP2 (__seek, FP, OFFSET, MODE) +#define _IO_WSYSSEEK(FP, OFFSET, MODE) WJUMP2 (__seek, FP, OFFSET, MODE) /* The 'sysclose' hook is used to finalize (close, finish up) an external file. It generalizes the Unix close(2) function. @@ -225,6 +243,7 @@ typedef _IO_off_t (*_IO_seek_t) __PMT ((_IO_FILE *, _IO_off_t, int)); specific to this implementation. */ typedef int (*_IO_close_t) __PMT ((_IO_FILE *)); /* finalize */ #define _IO_SYSCLOSE(FP) JUMP0 (__close, FP) +#define _IO_WSYSCLOSE(FP) WJUMP0 (__close, FP) /* The 'sysstat' hook is used to get information about an external file into a struct stat buffer. It generalizes the Unix fstat(2) call. @@ -232,19 +251,20 @@ typedef int (*_IO_close_t) __PMT ((_IO_FILE *)); /* finalize */ specific to this implementation. */ typedef int (*_IO_stat_t) __PMT ((_IO_FILE *, void *)); #define _IO_SYSSTAT(FP, BUF) JUMP1 (__stat, FP, BUF) +#define _IO_WSYSSTAT(FP, BUF) WJUMP1 (__stat, FP, BUF) -#if _G_IO_IO_FILE_VERSION == 0x20001 /* The 'showmany' hook can be used to get an image how much input is available. In many cases the answer will be 0 which means unknown but some cases one can provide real information. */ typedef int (*_IO_showmanyc_t) __PMT ((_IO_FILE *)); #define _IO_SHOWMANYC(FP) JUMP0 (__showmanyc, FP) +#define _IO_WSHOWMANYC(FP) WJUMP0 (__showmanyc, FP) /* The 'imbue' hook is used to get information about the currently installed locales. */ typedef void (*_IO_imbue_t) __PMT ((_IO_FILE *, void *)); #define _IO_IMBUE(FP, LOCALE) JUMP1 (__imbue, FP, LOCALE) -#endif +#define _IO_WIMBUE(FP, LOCALE) WJUMP1 (__imbue, FP, LOCALE) #define _IO_CHAR_TYPE char /* unsigned char ? */ @@ -274,10 +294,8 @@ struct _IO_jump_t JUMP_FIELD(_IO_seek_t, __seek); JUMP_FIELD(_IO_close_t, __close); JUMP_FIELD(_IO_stat_t, __stat); -#if _G_IO_IO_FILE_VERSION == 0x20001 JUMP_FIELD(_IO_showmanyc_t, __showmanyc); JUMP_FIELD(_IO_imbue_t, __imbue); -#endif #if 0 get_column; set_column; @@ -295,15 +313,19 @@ struct _IO_FILE_plus const struct _IO_jump_t *vtable; }; -/* Generic functions */ +/* Special file type for fopencookie function. */ +struct _IO_cookie_file +{ + struct _IO_FILE_plus __fp; + void *__cookie; + _IO_cookie_io_functions_t __io_functions; +}; -#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001 -extern _IO_off64_t _IO_seekoff __P ((_IO_FILE *, _IO_off64_t, int, int)); -extern _IO_off64_t _IO_seekpos __P ((_IO_FILE *, _IO_off64_t, int)); -#else -extern _IO_off_t _IO_seekoff __P ((_IO_FILE *, _IO_off_t, int, int)); -extern _IO_off_t _IO_seekpos __P ((_IO_FILE *, _IO_off_t, int)); -#endif +/* Iterator type for walking global linked list of _IO_FILE objects. */ + +typedef struct _IO_FILE_plus *_IO_ITER; + +/* Generic functions */ extern void _IO_switch_to_main_get_area __P ((_IO_FILE *)); extern void _IO_switch_to_backup_area __P ((_IO_FILE *)); @@ -311,130 +333,245 @@ extern int _IO_switch_to_get_mode __P ((_IO_FILE *)); extern void _IO_init __P ((_IO_FILE *, int)); extern int _IO_sputbackc __P ((_IO_FILE *, int)); extern int _IO_sungetc __P ((_IO_FILE *)); -extern void _IO_un_link __P ((_IO_FILE *)); -extern void _IO_link_in __P ((_IO_FILE *)); +extern void _IO_un_link __P ((struct _IO_FILE_plus *)); +extern void _IO_link_in __P ((struct _IO_FILE_plus *)); extern void _IO_doallocbuf __P ((_IO_FILE *)); extern void _IO_unsave_markers __P ((_IO_FILE *)); extern void _IO_setb __P ((_IO_FILE *, char *, char *, int)); extern unsigned _IO_adjust_column __P ((unsigned, const char *, int)); #define _IO_sputn(__fp, __s, __n) _IO_XSPUTN (__fp, __s, __n) +extern void _IO_switch_to_main_wget_area __P ((_IO_FILE *)); +extern void _IO_switch_to_wbackup_area __P ((_IO_FILE *)); +extern int _IO_switch_to_wget_mode __P ((_IO_FILE *)); +extern void _IO_wsetb __P ((_IO_FILE *, wchar_t *, wchar_t *, int)); +extern wint_t _IO_sputbackwc __P ((_IO_FILE *, wint_t)); +extern wint_t _IO_sungetwc __P ((_IO_FILE *)); +extern void _IO_wdoallocbuf __P ((_IO_FILE *)); +extern void _IO_unsave_wmarkers __P ((_IO_FILE *)); +extern unsigned _IO_adjust_wcolumn __P ((unsigned, const wchar_t *, int)); + /* Marker-related function. */ extern void _IO_init_marker __P ((struct _IO_marker *, _IO_FILE *)); +extern void _IO_init_wmarker __P ((struct _IO_marker *, _IO_FILE *)); extern void _IO_remove_marker __P ((struct _IO_marker *)); extern int _IO_marker_difference __P ((struct _IO_marker *, struct _IO_marker *)); extern int _IO_marker_delta __P ((struct _IO_marker *)); +extern int _IO_wmarker_delta __P ((struct _IO_marker *)); extern int _IO_seekmark __P ((_IO_FILE *, struct _IO_marker *, int)); +extern int _IO_seekwmark __P ((_IO_FILE *, struct _IO_marker *, int)); + +/* Functions for iterating global list and dealing with + its lock */ + +extern _IO_ITER _IO_iter_begin __P ((void)); +extern _IO_ITER _IO_iter_end __P ((void)); +extern _IO_ITER _IO_iter_next __P ((_IO_ITER)); +extern _IO_FILE *_IO_iter_file __P ((_IO_ITER)); +extern void _IO_list_lock __P ((void)); +extern void _IO_list_unlock __P ((void)); +extern void _IO_list_resetlock __P ((void)); /* Default jumptable functions. */ extern int _IO_default_underflow __P ((_IO_FILE *)); extern int _IO_default_uflow __P ((_IO_FILE *)); +extern wint_t _IO_wdefault_uflow __P ((_IO_FILE *)); extern int _IO_default_doallocate __P ((_IO_FILE *)); +extern int _IO_wdefault_doallocate __P ((_IO_FILE *)); extern void _IO_default_finish __P ((_IO_FILE *, int)); +extern void _IO_wdefault_finish __P ((_IO_FILE *, int)); extern int _IO_default_pbackfail __P ((_IO_FILE *, int)); +extern wint_t _IO_wdefault_pbackfail __P ((_IO_FILE *, wint_t)); extern _IO_FILE* _IO_default_setbuf __P ((_IO_FILE *, char *, _IO_ssize_t)); +extern _IO_FILE* _IO_wdefault_setbuf __P ((_IO_FILE *, wchar_t *, + _IO_ssize_t)); extern _IO_size_t _IO_default_xsputn __P ((_IO_FILE *, const void *, _IO_size_t)); +extern _IO_size_t _IO_wdefault_xsputn __P ((_IO_FILE *, const void *, + _IO_size_t)); extern _IO_size_t _IO_default_xsgetn __P ((_IO_FILE *, void *, _IO_size_t)); -#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001 +extern _IO_size_t _IO_wdefault_xsgetn __P ((_IO_FILE *, void *, _IO_size_t)); extern _IO_off64_t _IO_default_seekoff __P ((_IO_FILE *, - _IO_off64_t, int, int)); -extern _IO_off64_t _IO_default_seekpos __P ((_IO_FILE *, - _IO_off64_t, int)); -extern _IO_off64_t _IO_default_seek __P ((_IO_FILE *, _IO_off64_t, int)); -#else -extern _IO_off_t _IO_default_seekoff __P ((_IO_FILE *, _IO_off_t, int, int)); -extern _IO_off_t _IO_default_seekpos __P ((_IO_FILE *, _IO_off_t, int)); -extern _IO_off_t _IO_default_seek __P ((_IO_FILE *, _IO_off_t, int)); -#endif + _IO_off64_t, int, int)); +extern _IO_off64_t _IO_default_seekpos __P ((_IO_FILE *, _IO_off64_t, int)); extern _IO_ssize_t _IO_default_write __P ((_IO_FILE *, const void *, _IO_ssize_t)); extern _IO_ssize_t _IO_default_read __P ((_IO_FILE *, void *, _IO_ssize_t)); extern int _IO_default_stat __P ((_IO_FILE *, void *)); +extern _IO_off64_t _IO_default_seek __P ((_IO_FILE *, _IO_off64_t, int)); extern int _IO_default_sync __P ((_IO_FILE *)); #define _IO_default_close ((_IO_close_t) _IO_default_sync) +extern int _IO_default_showmanyc __P ((_IO_FILE *)); +extern void _IO_default_imbue __P ((_IO_FILE *, void *)); extern struct _IO_jump_t _IO_file_jumps; +extern struct _IO_jump_t _IO_wfile_jumps; +extern struct _IO_jump_t _IO_old_file_jumps; extern struct _IO_jump_t _IO_streambuf_jumps; extern struct _IO_jump_t _IO_proc_jumps; +extern struct _IO_jump_t _IO_old_proc_jumps; extern struct _IO_jump_t _IO_str_jumps; +extern struct _IO_jump_t _IO_wstr_jumps; +extern struct _IO_codecvt __libio_codecvt; extern int _IO_do_write __P ((_IO_FILE *, const char *, _IO_size_t)); +extern int _IO_new_do_write __P ((_IO_FILE *, const char *, _IO_size_t)); +extern int _IO_old_do_write __P ((_IO_FILE *, const char *, _IO_size_t)); +extern int _IO_wdo_write __P ((_IO_FILE *, const wchar_t *, _IO_size_t)); extern int _IO_flush_all __P ((void)); -extern void _IO_cleanup __P ((void)); +extern int _IO_cleanup __P ((void)); extern void _IO_flush_all_linebuffered __P ((void)); +extern int _IO_new_fgetpos __P ((_IO_FILE *, _IO_fpos_t *)); +extern int _IO_old_fgetpos __P ((_IO_FILE *, _IO_fpos_t *)); +extern int _IO_new_fsetpos __P ((_IO_FILE *, const _IO_fpos_t *)); +extern int _IO_old_fsetpos __P ((_IO_FILE *, const _IO_fpos_t *)); +extern int _IO_new_fgetpos64 __P ((_IO_FILE *, _IO_fpos64_t *)); +extern int _IO_old_fgetpos64 __P ((_IO_FILE *, _IO_fpos64_t *)); +extern int _IO_new_fsetpos64 __P ((_IO_FILE *, const _IO_fpos64_t *)); +extern int _IO_old_fsetpos64 __P ((_IO_FILE *, const _IO_fpos64_t *)); -#define _IO_do_flush(_f) \ - _IO_do_write(_f, (_f)->_IO_write_base, \ - (_f)->_IO_write_ptr-(_f)->_IO_write_base) + +#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T +# define _IO_do_flush(_f) \ + ((_f)->_mode <= 0 \ + ? _IO_do_write(_f, (_f)->_IO_write_base, \ + (_f)->_IO_write_ptr-(_f)->_IO_write_base) \ + : _IO_wdo_write(_f, (_f)->_wide_data->_IO_write_base, \ + ((_f)->_wide_data->_IO_write_ptr \ + - (_f)->_wide_data->_IO_write_base))) +#else +# define _IO_do_flush(_f) \ + _IO_do_write(_f, (_f)->_IO_write_base, \ + (_f)->_IO_write_ptr-(_f)->_IO_write_base) +#endif +#define _IO_old_do_flush(_f) \ + _IO_old_do_write(_f, (_f)->_IO_write_base, \ + (_f)->_IO_write_ptr-(_f)->_IO_write_base) #define _IO_in_put_mode(_fp) ((_fp)->_flags & _IO_CURRENTLY_PUTTING) #define _IO_mask_flags(fp, f, mask) \ ((fp)->_flags = ((fp)->_flags & ~(mask)) | ((f) & (mask))) #define _IO_setg(fp, eb, g, eg) ((fp)->_IO_read_base = (eb),\ (fp)->_IO_read_ptr = (g), (fp)->_IO_read_end = (eg)) +#define _IO_wsetg(fp, eb, g, eg) ((fp)->_wide_data->_IO_read_base = (eb),\ + (fp)->_wide_data->_IO_read_ptr = (g), \ + (fp)->_wide_data->_IO_read_end = (eg)) #define _IO_setp(__fp, __p, __ep) \ - ((__fp)->_IO_write_base = (__fp)->_IO_write_ptr = __p, (__fp)->_IO_write_end = (__ep)) + ((__fp)->_IO_write_base = (__fp)->_IO_write_ptr \ + = __p, (__fp)->_IO_write_end = (__ep)) +#define _IO_wsetp(__fp, __p, __ep) \ + ((__fp)->_wide_data->_IO_write_base \ + = (__fp)->_wide_data->_IO_write_ptr = __p, \ + (__fp)->_wide_data->_IO_write_end = (__ep)) #define _IO_have_backup(fp) ((fp)->_IO_save_base != NULL) +#define _IO_have_wbackup(fp) ((fp)->_wide_data->_IO_save_base != NULL) #define _IO_in_backup(fp) ((fp)->_flags & _IO_IN_BACKUP) #define _IO_have_markers(fp) ((fp)->_markers != NULL) #define _IO_blen(fp) ((fp)->_IO_buf_end - (fp)->_IO_buf_base) +#define _IO_wblen(fp) ((fp)->_wide_data->_IO_buf_end \ + - (fp)->_wide_data->_IO_buf_base) /* Jumptable functions for files. */ extern int _IO_file_doallocate __P ((_IO_FILE *)); extern _IO_FILE* _IO_file_setbuf __P ((_IO_FILE *, char *, _IO_ssize_t)); -#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001 extern _IO_off64_t _IO_file_seekoff __P ((_IO_FILE *, _IO_off64_t, int, int)); -extern _IO_off64_t _IO_file_seek __P ((_IO_FILE *, _IO_off64_t, int)); -#else -extern _IO_off_t _IO_file_seekoff __P ((_IO_FILE *, _IO_off_t, int, int)); -extern _IO_off_t _IO_file_seek __P ((_IO_FILE *, _IO_off_t, int)); -#endif extern _IO_size_t _IO_file_xsputn __P ((_IO_FILE *, const void *, _IO_size_t)); +extern _IO_size_t _IO_file_xsgetn __P ((_IO_FILE *, void *, _IO_size_t)); extern int _IO_file_stat __P ((_IO_FILE *, void *)); extern int _IO_file_close __P ((_IO_FILE *)); extern int _IO_file_underflow __P ((_IO_FILE *)); extern int _IO_file_overflow __P ((_IO_FILE *, int)); -#define _IO_file_is_open(__fp) ((__fp)->_fileno >= 0) -extern void _IO_file_init __P ((_IO_FILE *)); +#define _IO_file_is_open(__fp) ((__fp)->_fileno != -1) +extern void _IO_file_init __P ((struct _IO_FILE_plus *)); extern _IO_FILE* _IO_file_attach __P ((_IO_FILE *, int)); extern _IO_FILE* _IO_file_open __P ((_IO_FILE *, const char *, int, int, int, int)); -#if _G_IO_IO_FILE_VERSION == 0x20001 extern _IO_FILE* _IO_file_fopen __P ((_IO_FILE *, const char *, const char *, int)); -#else -extern _IO_FILE* _IO_file_fopen __P ((_IO_FILE *, const char *, const char *)); -#endif extern _IO_ssize_t _IO_file_write __P ((_IO_FILE *, const void *, _IO_ssize_t)); extern _IO_ssize_t _IO_file_read __P ((_IO_FILE *, void *, _IO_ssize_t)); extern int _IO_file_sync __P ((_IO_FILE *)); extern int _IO_file_close_it __P ((_IO_FILE *)); +extern _IO_off64_t _IO_file_seek __P ((_IO_FILE *, _IO_off64_t, int)); extern void _IO_file_finish __P ((_IO_FILE *, int)); +extern _IO_FILE* _IO_new_file_attach __P ((_IO_FILE *, int)); +extern int _IO_new_file_close_it __P ((_IO_FILE *)); +extern void _IO_new_file_finish __P ((_IO_FILE *, int)); +extern _IO_FILE* _IO_new_file_fopen __P ((_IO_FILE *, const char *, const char *, + int)); +extern void _IO_no_init __P ((_IO_FILE *, int, int, struct _IO_wide_data *, + struct _IO_jump_t *)); +extern void _IO_new_file_init __P ((struct _IO_FILE_plus *)); +extern _IO_FILE* _IO_new_file_setbuf __P ((_IO_FILE *, char *, _IO_ssize_t)); +extern int _IO_new_file_sync __P ((_IO_FILE *)); +extern int _IO_new_file_underflow __P ((_IO_FILE *)); +extern int _IO_new_file_overflow __P ((_IO_FILE *, int)); +extern _IO_off64_t _IO_new_file_seekoff __P ((_IO_FILE *, _IO_off64_t, int, int)); +extern _IO_ssize_t _IO_new_file_write __P ((_IO_FILE *, const void *, + _IO_ssize_t)); +extern _IO_size_t _IO_new_file_xsputn __P ((_IO_FILE *, const void *, _IO_size_t)); + +extern _IO_FILE* _IO_old_file_setbuf __P ((_IO_FILE *, char *, _IO_ssize_t)); +extern _IO_off64_t _IO_old_file_seekoff __P ((_IO_FILE *, _IO_off64_t, int, + int)); +extern _IO_size_t _IO_old_file_xsputn __P ((_IO_FILE *, const void *, + _IO_size_t)); +extern int _IO_old_file_underflow __P ((_IO_FILE *)); +extern int _IO_old_file_overflow __P ((_IO_FILE *, int)); +extern void _IO_old_file_init __P ((struct _IO_FILE_plus *)); +extern _IO_FILE* _IO_old_file_attach __P ((_IO_FILE *, int)); +extern _IO_FILE* _IO_old_file_fopen __P ((_IO_FILE *, const char *, + const char *)); +extern _IO_ssize_t _IO_old_file_write __P ((_IO_FILE *, const void *, + _IO_ssize_t)); +extern int _IO_old_file_sync __P ((_IO_FILE *)); +extern int _IO_old_file_close_it __P ((_IO_FILE *)); +extern void _IO_old_file_finish __P ((_IO_FILE *, int)); + +extern int _IO_wfile_doallocate __P ((_IO_FILE *)); +extern _IO_size_t _IO_wfile_xsputn __P ((_IO_FILE *, const void *, + _IO_size_t)); +extern _IO_FILE* _IO_wfile_setbuf __P ((_IO_FILE *, wchar_t *, _IO_ssize_t)); +extern wint_t _IO_wfile_sync __P ((_IO_FILE *)); +extern wint_t _IO_wfile_underflow __P ((_IO_FILE *)); +extern wint_t _IO_wfile_overflow __P ((_IO_FILE *, wint_t)); +extern _IO_off64_t _IO_wfile_seekoff __P ((_IO_FILE *, _IO_off64_t, int, int)); + /* Jumptable functions for proc_files. */ extern _IO_FILE* _IO_proc_open __P ((_IO_FILE *, const char *, const char *)); +extern _IO_FILE* _IO_new_proc_open __P ((_IO_FILE *, const char *, const char *)); +extern _IO_FILE* _IO_old_proc_open __P ((_IO_FILE *, const char *, const char *)); extern int _IO_proc_close __P ((_IO_FILE *)); +extern int _IO_new_proc_close __P ((_IO_FILE *)); +extern int _IO_old_proc_close __P ((_IO_FILE *)); /* Jumptable functions for strfiles. */ extern int _IO_str_underflow __P ((_IO_FILE *)); extern int _IO_str_overflow __P ((_IO_FILE *, int)); extern int _IO_str_pbackfail __P ((_IO_FILE *, int)); -#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001 extern _IO_off64_t _IO_str_seekoff __P ((_IO_FILE *, _IO_off64_t, int, int)); -#else -extern _IO_off_t _IO_str_seekoff __P ((_IO_FILE *, _IO_off_t, int, int)); -#endif extern void _IO_str_finish __P ((_IO_FILE *, int)); /* Other strfile functions */ -extern void _IO_str_init_static __P ((_IO_FILE *, char *, int, char *)); -extern void _IO_str_init_readonly __P ((_IO_FILE *, const char *, int)); +struct _IO_strfile_; +extern void _IO_str_init_static __P ((struct _IO_strfile_ *, char *, int, char *)); +extern void _IO_str_init_readonly __P ((struct _IO_strfile_ *, const char *, int)); extern _IO_ssize_t _IO_str_count __P ((_IO_FILE *)); +/* And the wide character versions. */ +extern void _IO_wstr_init_static __P ((_IO_FILE *, wchar_t *, int, wchar_t *)); +extern void _IO_wstr_init_readonly __P ((_IO_FILE *, const char *, int)); +extern _IO_ssize_t _IO_wstr_count __P ((_IO_FILE *)); +extern _IO_wint_t _IO_wstr_overflow __P ((_IO_FILE *, _IO_wint_t)); +extern _IO_wint_t _IO_wstr_underflow __P ((_IO_FILE *)); +extern _IO_off64_t _IO_wstr_seekoff __P ((_IO_FILE *, _IO_off64_t, int, int)); +extern _IO_wint_t _IO_wstr_pbackfail __P ((_IO_FILE *, _IO_wint_t)); +extern void _IO_wstr_finish __P ((_IO_FILE *, int)); + extern int _IO_vasprintf __P ((char **result_ptr, __const char *format, _IO_va_list args)); extern int _IO_vdprintf __P ((int d, __const char *format, _IO_va_list arg)); @@ -446,6 +583,10 @@ extern _IO_size_t _IO_getline __P ((_IO_FILE *,char *, _IO_size_t, int, int)); extern _IO_size_t _IO_getline_info __P ((_IO_FILE *,char *, _IO_size_t, int, int, int *)); extern _IO_ssize_t _IO_getdelim __P ((char **, _IO_size_t *, int, _IO_FILE *)); +extern _IO_size_t _IO_getwline __P ((_IO_FILE *,wchar_t *, _IO_size_t, wint_t, + int)); +extern _IO_size_t _IO_getwline_info __P ((_IO_FILE *,wchar_t *, _IO_size_t, + wint_t, int, wint_t *)); extern double _IO_strtod __P ((const char *, char **)); extern char *_IO_dtoa __P ((double __d, int __mode, int __ndigits, int *__decpt, int *__sign, char **__rve)); @@ -453,7 +594,7 @@ extern int _IO_outfloat __P ((double __value, _IO_FILE *__sb, int __type, int __width, int __precision, int __flags, int __sign_mode, int __fill)); -extern _IO_FILE *_IO_list_all; +extern struct _IO_FILE_plus *_IO_list_all; extern void (*_IO_cleanup_registration_needed) __PMT ((void)); #ifndef EOF @@ -496,6 +637,7 @@ extern void (*_IO_cleanup_registration_needed) __PMT ((void)); /* When using this code in the GNU libc we must not pollute the name space. */ # define mmap __mmap # define munmap __munmap +# define ftruncate __ftruncate # endif # define ROUND_TO_PAGE(_S) \ @@ -508,7 +650,15 @@ extern void (*_IO_cleanup_registration_needed) __PMT ((void)); (_B) = (char *) mmap (0, ROUND_TO_PAGE (_S), \ PROT_READ | PROT_WRITE, \ MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); \ - if ((_B) == (char *) -1) \ + if ((_B) == (char *) MAP_FAILED) \ + return (_R); \ + } while (0) +# define ALLOC_WBUF(_B, _S, _R) \ + do { \ + (_B) = (wchar_t *) mmap (0, ROUND_TO_PAGE (_S), \ + PROT_READ | PROT_WRITE, \ + MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); \ + if ((_B) == (wchar_t *) MAP_FAILED) \ return (_R); \ } while (0) @@ -522,6 +672,12 @@ extern void (*_IO_cleanup_registration_needed) __PMT ((void)); if ((_B) == NULL) \ return (_R); \ } while (0) +# define ALLOC_WBUF(_B, _S, _R) \ + do { \ + (_B) = (wchar_t *)malloc(_S); \ + if ((_B) == NULL) \ + return (_R); \ + } while (0) #endif /* _G_HAVE_MMAP */ @@ -531,43 +687,22 @@ extern void (*_IO_cleanup_registration_needed) __PMT ((void)); struct stat; extern _IO_ssize_t _IO_read __P ((int, void *, _IO_size_t)); extern _IO_ssize_t _IO_write __P ((int, const void *, _IO_size_t)); -extern _IO_off_t _IO_lseek __P ((int, _IO_off_t, int)); +extern _IO_off64_t _IO_lseek __P ((int, _IO_off64_t, int)); extern int _IO_close __P ((int)); extern int _IO_fstat __P ((int, struct stat *)); extern int _IO_vscanf __P ((const char *, _IO_va_list)); -/* Operations on _IO_fpos_t. - Normally, these are trivial, but we provide hooks for configurations - where an _IO_fpos_t is a struct. - Note that _IO_off_t must be an integral type. */ - -/* _IO_pos_BAD is an _IO_off_t value indicating error, unknown, or EOF. */ +/* _IO_pos_BAD is an _IO_off64_t value indicating error, unknown, or EOF. */ #ifndef _IO_pos_BAD -# if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001 -# define _IO_pos_BAD ((_IO_off64_t) -1) -# else -# define _IO_pos_BAD ((_IO_off_t) -1) -# endif +# define _IO_pos_BAD ((_IO_off64_t) -1) #endif -/* _IO_pos_as_off converts an _IO_fpos_t value to an _IO_off_t value. */ -#ifndef _IO_pos_as_off -# if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001 -# define _IO_pos_as_off(__pos) ((_IO_off64_t) (__pos)) -# else -# define _IO_pos_as_off(__pos) ((_IO_off_t) (__pos)) -# endif -#endif -/* _IO_pos_adjust adjust an _IO_fpos_t by some number of bytes. */ +/* _IO_pos_adjust adjust an _IO_off64_t by some number of bytes. */ #ifndef _IO_pos_adjust -# define _IO_pos_adjust(__pos, __delta) ((__pos) += (__delta)) +# define _IO_pos_adjust(pos, delta) ((pos) += (delta)) #endif -/* _IO_pos_0 is an _IO_fpos_t value indicating beginning of file. */ +/* _IO_pos_0 is an _IO_off64_t value indicating beginning of file. */ #ifndef _IO_pos_0 -# if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001 -# define _IO_pos_0 ((_IO_fpos64_t) 0) -# else -# define _IO_pos_0 ((_IO_fpos_t) 0) -# endif +# define _IO_pos_0 ((_IO_off64_t) 0) #endif #ifdef __cplusplus @@ -576,15 +711,46 @@ extern int _IO_vscanf __P ((const char *, _IO_va_list)); #ifdef _IO_MTSAFE_IO /* check following! */ -# define FILEBUF_LITERAL(CHAIN, FLAGS, FD) \ +# ifdef _IO_USE_OLD_IO_FILE +# define FILEBUF_LITERAL(CHAIN, FLAGS, FD, WDP) \ { _IO_MAGIC+_IO_LINKED+_IO_IS_FILEBUF+FLAGS, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, CHAIN, FD, \ - 0, 0, 0, 0, { 0 }, &_IO_stdfile_##FD##_lock } -#else -/* check following! */ -# define FILEBUF_LITERAL(CHAIN, FLAGS, FD) \ + 0, _IO_pos_BAD, 0, 0, { 0 }, &_IO_stdfile_##FD##_lock } +# else +# if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T +# define FILEBUF_LITERAL(CHAIN, FLAGS, FD, WDP) \ { _IO_MAGIC+_IO_LINKED+_IO_IS_FILEBUF+FLAGS, \ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, CHAIN, FD } + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, CHAIN, FD, \ + 0, _IO_pos_BAD, 0, 0, { 0 }, &_IO_stdfile_##FD##_lock, _IO_pos_BAD,\ + NULL, WDP, 0 } +# else +# define FILEBUF_LITERAL(CHAIN, FLAGS, FD, WDP) \ + { _IO_MAGIC+_IO_LINKED+_IO_IS_FILEBUF+FLAGS, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, CHAIN, FD, \ + 0, _IO_pos_BAD, 0, 0, { 0 }, &_IO_stdfile_##FD##_lock, _IO_pos_BAD,\ + 0 } +# endif +# endif +#else +# ifdef _IO_USE_OLD_IO_FILE +# define FILEBUF_LITERAL(CHAIN, FLAGS, FD, WDP) \ + { _IO_MAGIC+_IO_LINKED+_IO_IS_FILEBUF+FLAGS, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, CHAIN, FD, 0, _IO_pos_BAD } +# else +# if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T +# define FILEBUF_LITERAL(CHAIN, FLAGS, FD, WDP) \ + { _IO_MAGIC+_IO_LINKED+_IO_IS_FILEBUF+FLAGS, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, CHAIN, FD, \ + 0, _IO_pos_BAD, 0, 0, { 0 }, 0, _IO_pos_BAD, \ + NULL, WDP, 0 } +# else +# define FILEBUF_LITERAL(CHAIN, FLAGS, FD, WDP) \ + { _IO_MAGIC+_IO_LINKED+_IO_IS_FILEBUF+FLAGS, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, CHAIN, FD, \ + 0, _IO_pos_BAD, 0, 0, { 0 }, 0, _IO_pos_BAD, \ + 0 } +# endif +# endif #endif /* VTABLE_LABEL defines NAME as of the CLASS class. diff --git a/libstdc++-v3/libio/stdfiles.c b/libstdc++-v3/libio/stdfiles.c index 8453e33c34cd..6441bfb0da97 100644 --- a/libstdc++-v3/libio/stdfiles.c +++ b/libstdc++-v3/libio/stdfiles.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1994, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1994, 1996, 1997, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU IO Library. This library is free software; you can redistribute it and/or @@ -31,21 +31,44 @@ hand, we don't need a C++ compiler to build this file.) */ #include "libioP.h" - -#ifdef _IO_MTSAFE_IO -#define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \ - static _IO_lock_t _IO_stdfile_##FD##_lock = _IO_lock_initializer; \ - struct _IO_FILE_plus NAME \ - = {FILEBUF_LITERAL(CHAIN, FLAGS, FD), &_IO_file_jumps} -#else -#define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \ - struct _IO_FILE_plus NAME \ - = {FILEBUF_LITERAL(CHAIN, FLAGS, FD), &_IO_file_jumps} +#ifndef _LIBC +# include #endif -DEF_STDFILE(_IO_stdin_, 0, 0, _IO_NO_WRITES); -DEF_STDFILE(_IO_stdout_, 1, &_IO_stdin_.file, _IO_NO_READS); -DEF_STDFILE(_IO_stderr_, 2, &_IO_stdout_.file, - _IO_NO_READS+_IO_UNBUFFERED); +#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T +# ifdef _IO_MTSAFE_IO +# define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \ + static _IO_lock_t _IO_stdfile_##FD##_lock = _IO_lock_initializer; \ + static struct _IO_wide_data _IO_wide_data_##FD \ + = { ._wide_vtable = &_IO_wfile_jumps }; \ + struct _IO_FILE_plus NAME \ + = {FILEBUF_LITERAL(CHAIN, FLAGS, FD, &_IO_wide_data_##FD), \ + &_IO_file_jumps}; +# else +# define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \ + static struct _IO_wide_data _IO_wide_data_##FD \ + = { ._wide_vtable = &_IO_wfile_jumps }; \ + struct _IO_FILE_plus NAME \ + = {FILEBUF_LITERAL(CHAIN, FLAGS, FD, &_IO_wide_data_##FD), \ + &_IO_file_jumps}; +# endif +#else +# ifdef _IO_MTSAFE_IO +# define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \ + static _IO_lock_t _IO_stdfile_##FD##_lock = _IO_lock_initializer; \ + struct _IO_FILE_plus NAME \ + = {FILEBUF_LITERAL(CHAIN, FLAGS, FD, NULL), \ + &_IO_file_jumps}; +# else +# define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \ + struct _IO_FILE_plus NAME \ + = {FILEBUF_LITERAL(CHAIN, FLAGS, FD, NULL), \ + &_IO_file_jumps}; +# endif +#endif -_IO_FILE *_IO_list_all = &_IO_stderr_.file; +DEF_STDFILE(_IO_2_1_stdin_, 0, 0, _IO_NO_WRITES); +DEF_STDFILE(_IO_2_1_stdout_, 1, &_IO_2_1_stdin_, _IO_NO_READS); +DEF_STDFILE(_IO_2_1_stderr_, 2, &_IO_2_1_stdout_, _IO_NO_READS+_IO_UNBUFFERED); + +struct _IO_FILE_plus *_IO_list_all = &_IO_2_1_stderr_; diff --git a/libstdc++-v3/libio/wfiledoalloc.c b/libstdc++-v3/libio/wfiledoalloc.c new file mode 100644 index 000000000000..7f5cb7f960b4 --- /dev/null +++ b/libstdc++-v3/libio/wfiledoalloc.c @@ -0,0 +1,105 @@ +/* Copyright (C) 1993, 1997, 1999 Free Software Foundation, Inc. + This file is part of the GNU IO Library. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2, or (at + your option) any later version. + + This library is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, Boston, + MA 02111-1307, USA. + + As a special exception, if you link this library with files + compiled with a GNU compiler to produce an executable, this does + not cause the resulting executable to be covered by the GNU General + Public License. This exception does not however invalidate any + other reasons why the executable file might be covered by the GNU + General Public License. */ + +/* + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that the above copyright notice and this paragraph are + * duplicated in all such forms and that any documentation, + * advertising materials, and other materials related to such + * distribution and use acknowledge that the software was developed + * by the University of California, Berkeley. The name of the + * University may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + +/* Modified for GNU iostream by Per Bothner 1991, 1992. */ + +#ifndef _POSIX_SOURCE +# define _POSIX_SOURCE +#endif +#include "libioP.h" +#include +#include +#ifdef __STDC__ +#include +#include +#endif + +#ifdef _LIBC +# undef isatty +# define isatty(Fd) __isatty (Fd) +#endif + +/* + * Allocate a file buffer, or switch to unbuffered I/O. + * Per the ANSI C standard, ALL tty devices default to line buffered. + * + * As a side effect, we set __SOPT or __SNPT (en/dis-able fseek + * optimisation) right after the _fstat() that finds the buffer size. + */ + +int +_IO_wfile_doallocate (fp) + _IO_FILE *fp; +{ + _IO_size_t size; + int couldbetty; + wchar_t *p; + struct _G_stat64 st; + + /* Allocate room for the external buffer. */ + _IO_file_doallocate (fp); + + if (fp->_fileno < 0 || _IO_SYSSTAT (fp, &st) < 0) + { + couldbetty = 0; + size = _IO_BUFSIZ * sizeof (wchar_t); +#if 0 + /* do not try to optimise fseek() */ + fp->_flags |= __SNPT; +#endif + } + else + { + couldbetty = S_ISCHR (st.st_mode); +#if _IO_HAVE_ST_BLKSIZE + size = ((st.st_blksize <= 0 ? _IO_BUFSIZ : st.st_blksize) + * sizeof (wchar_t)); +#else + size = _IO_BUFSIZ * sizeof (wchar_t); +#endif + } + ALLOC_WBUF (p, size, EOF); + _IO_wsetb (fp, p, p + size, 1); + if (couldbetty && isatty (fp->_fileno)) + fp->_flags |= _IO_LINE_BUF; + return 1; +} diff --git a/libstdc++-v3/libio/wfileops.c b/libstdc++-v3/libio/wfileops.c new file mode 100644 index 000000000000..ad46c7c9f782 --- /dev/null +++ b/libstdc++-v3/libio/wfileops.c @@ -0,0 +1,734 @@ +/* Copyright (C) 1993, 1995, 1997, 1998, 1999 Free Software Foundation, Inc. + This file is part of the GNU IO Library. + Written by Ulrich Drepper . + Based on the single byte version by Per Bothner . + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2, or (at + your option) any later version. + + This library is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, Boston, + MA 02111-1307, USA. + + As a special exception, if you link this library with files + compiled with a GNU compiler to produce an executable, this does + not cause the resulting executable to be covered by the GNU General + Public License. This exception does not however invalidate any + other reasons why the executable file might be covered by the GNU + General Public License. */ + +#include +#include +#include +#include +#include +#include + + +#ifndef _LIBC +# define _IO_new_do_write _IO_do_write +# define _IO_new_file_attach _IO_file_attach +# define _IO_new_file_close_it _IO_file_close_it +# define _IO_new_file_finish _IO_file_finish +# define _IO_new_file_fopen _IO_file_fopen +# define _IO_new_file_init _IO_file_init +# define _IO_new_file_setbuf _IO_file_setbuf +# define _IO_new_file_sync _IO_file_sync +# define _IO_new_file_overflow _IO_file_overflow +# define _IO_new_file_seekoff _IO_file_seekoff +# define _IO_new_file_underflow _IO_file_underflow +# define _IO_new_file_write _IO_file_write +# define _IO_new_file_xsputn _IO_file_xsputn +#endif + + +_IO_FILE * +_IO_wfile_setbuf (fp, p, len) + _IO_FILE *fp; + wchar_t *p; + _IO_ssize_t len; +{ + if (_IO_wdefault_setbuf (fp, p, len) == NULL) + return NULL; + + fp->_wide_data->_IO_write_base = fp->_wide_data->_IO_write_ptr = + fp->_wide_data->_IO_write_end = fp->_wide_data->_IO_buf_base; + _IO_wsetg (fp, fp->_wide_data->_IO_buf_base, fp->_wide_data->_IO_buf_base, + fp->_wide_data->_IO_buf_base); + + return fp; +} + + +/* Convert TO_DO wide character from DATA to FP. + Then mark FP as having empty buffers. */ +int +_IO_wdo_write (fp, data, to_do) + _IO_FILE *fp; + const wchar_t *data; + _IO_size_t to_do; +{ + struct _IO_codecvt *cc = &fp->_wide_data->_codecvt; + _IO_size_t count = 0; + + while (to_do > 0) + { + enum __codecvt_result result; + const wchar_t *new_data; + + if (fp->_IO_write_end == fp->_IO_write_ptr) + { + _IO_new_file_overflow (fp, EOF); + assert (fp->_IO_write_end > fp->_IO_write_ptr); + } + + /* Now convert from the internal format into the external buffer. */ + result = (*cc->__codecvt_do_out) (cc, &fp->_wide_data->_IO_state, + data, data + to_do, &new_data, + fp->_IO_write_ptr, + fp->_IO_write_end, + &fp->_IO_write_ptr); + + /* Write out what we produced so far. */ + if (_IO_new_do_write (fp, fp->_IO_write_base, + fp->_IO_write_ptr - fp->_IO_write_base) == EOF) + /* Something went wrong. */ + return EOF; + + count += new_data - data; + to_do -= new_data - data; + data = new_data; + + /* Next see whether we had problems during the conversion. If yes, + we cannot go on. */ + if (result != __codecvt_ok) + break; + } + + _IO_wsetg (fp, fp->_wide_data->_IO_buf_base, fp->_wide_data->_IO_buf_base, + fp->_wide_data->_IO_buf_base); + fp->_wide_data->_IO_write_base = fp->_wide_data->_IO_write_ptr + = fp->_wide_data->_IO_buf_base; + fp->_wide_data->_IO_write_end = ((fp->_flags & (_IO_LINE_BUF+_IO_UNBUFFERED)) + ? fp->_wide_data->_IO_buf_base + : fp->_wide_data->_IO_buf_end); + + return count; +} + + +wint_t +_IO_wfile_underflow (fp) + _IO_FILE *fp; +{ + struct _IO_codecvt *cd; + enum __codecvt_result status; + _IO_ssize_t count; + int tries; + const char *read_ptr_copy; + + if (fp->_flags & _IO_NO_READS) + { + fp->_flags |= _IO_ERR_SEEN; + __set_errno (EBADF); + return WEOF; + } + if (fp->_wide_data->_IO_read_ptr < fp->_wide_data->_IO_read_end) + return *fp->_wide_data->_IO_read_ptr; + + cd = &fp->_wide_data->_codecvt; + + /* Maybe there is something left in the external buffer. */ + if (fp->_IO_read_ptr < fp->_IO_read_end) + { + /* Convert it. */ + size_t avail_bytes = fp->_IO_read_end - fp->_IO_read_ptr; + + if (avail_bytes >= (*cd->__codecvt_do_max_length) (cd)) + { + /* There is more in the external. */ + const char *read_stop = (const char *) fp->_IO_read_ptr; + + fp->_wide_data->_IO_last_state = fp->_wide_data->_IO_state; + status = (*cd->__codecvt_do_in) (cd, &fp->_wide_data->_IO_state, + fp->_IO_read_ptr, fp->_IO_read_end, + &read_stop, + fp->_wide_data->_IO_read_end, + fp->_wide_data->_IO_buf_end, + &fp->_wide_data->_IO_read_end); + + fp->_IO_read_ptr = (char *) read_stop; + + /* If we managed to generate some text return the next character. */ + if (fp->_wide_data->_IO_read_ptr < fp->_wide_data->_IO_read_end) + return *fp->_wide_data->_IO_read_ptr; + + if (status == __codecvt_error) + { + __set_errno (EILSEQ); + fp->_flags |= _IO_ERR_SEEN; + return WEOF; + } + } + + /* Move the remaining content of the read buffer to the beginning. */ + memmove (fp->_IO_buf_base, fp->_IO_read_ptr, + fp->_IO_read_end - fp->_IO_read_ptr); + fp->_IO_read_end = (fp->_IO_buf_base + + (fp->_IO_read_end - fp->_IO_read_ptr)); + fp->_IO_read_base = fp->_IO_read_ptr = fp->_IO_buf_base; + } + else + fp->_IO_read_base = fp->_IO_read_ptr = fp->_IO_read_end = + fp->_IO_buf_base; + + fp->_IO_write_base = fp->_IO_write_ptr = fp->_IO_write_end = + fp->_IO_buf_base; + + if (fp->_IO_buf_base == NULL) + { + /* Maybe we already have a push back pointer. */ + if (fp->_IO_save_base != NULL) + { + free (fp->_IO_save_base); + fp->_flags &= ~_IO_IN_BACKUP; + } + _IO_doallocbuf (fp); + } + + if (fp->_wide_data->_IO_buf_base == NULL) + { + /* Maybe we already have a push back pointer. */ + if (fp->_wide_data->_IO_save_base != NULL) + { + free (fp->_wide_data->_IO_save_base); + fp->_flags &= ~_IO_IN_BACKUP; + } + _IO_wdoallocbuf (fp); + } + + /* Flush all line buffered files before reading. */ + /* FIXME This can/should be moved to genops ?? */ + if (fp->_flags & (_IO_LINE_BUF|_IO_UNBUFFERED)) + _IO_flush_all_linebuffered (); + + _IO_switch_to_get_mode (fp); + + fp->_IO_read_base = fp->_IO_read_ptr = fp->_IO_buf_base; + fp->_IO_read_end = fp->_IO_buf_base; + fp->_IO_write_base = fp->_IO_write_ptr = fp->_IO_write_end + = fp->_IO_buf_base; + + fp->_wide_data->_IO_read_base = fp->_wide_data->_IO_read_ptr = + fp->_wide_data->_IO_buf_base; + fp->_wide_data->_IO_read_end = fp->_wide_data->_IO_buf_base; + fp->_wide_data->_IO_write_base = fp->_wide_data->_IO_write_ptr = + fp->_wide_data->_IO_write_end = fp->_wide_data->_IO_buf_base; + + tries = 0; + again: + count = _IO_SYSREAD (fp, fp->_IO_read_end, + fp->_IO_buf_end - fp->_IO_read_end); + if (count <= 0) + { + if (count == 0 && tries == 0) + fp->_flags |= _IO_EOF_SEEN; + else + fp->_flags |= _IO_ERR_SEEN, count = 0; + } + fp->_IO_read_end += count; + if (count == 0) + { + if (tries != 0) + /* There are some bytes in the external buffer but they don't + convert to anything. */ + __set_errno (EILSEQ); + return WEOF; + } + if (fp->_offset != _IO_pos_BAD) + _IO_pos_adjust (fp->_offset, count); + + /* Now convert the read input. */ + fp->_wide_data->_IO_last_state = fp->_wide_data->_IO_state; + fp->_IO_read_base = fp->_IO_read_ptr; + status = (*cd->__codecvt_do_in) (cd, &fp->_wide_data->_IO_state, + fp->_IO_read_ptr, fp->_IO_read_end, + &read_ptr_copy, + fp->_wide_data->_IO_read_end, + fp->_wide_data->_IO_buf_end, + &fp->_wide_data->_IO_read_end); + + fp->_IO_read_ptr = (char *) read_ptr_copy; + if (fp->_wide_data->_IO_read_end == fp->_wide_data->_IO_buf_base) + { + if (status == __codecvt_error || fp->_IO_read_end == fp->_IO_buf_end) + { + __set_errno (EILSEQ); + fp->_flags |= _IO_ERR_SEEN; + return WEOF; + } + + /* The read bytes make no complete character. Try reading again. */ + assert (status == __codecvt_partial); + ++tries; + goto again; + } + + return *fp->_wide_data->_IO_read_ptr; +} + + +wint_t +_IO_wfile_overflow (f, wch) + _IO_FILE *f; + wint_t wch; +{ + if (f->_flags & _IO_NO_WRITES) /* SET ERROR */ + { + f->_flags |= _IO_ERR_SEEN; + __set_errno (EBADF); + return WEOF; + } + /* If currently reading or no buffer allocated. */ + if ((f->_flags & _IO_CURRENTLY_PUTTING) == 0) + { + /* Allocate a buffer if needed. */ + if (f->_wide_data->_IO_write_base == 0) + { + _IO_wdoallocbuf (f); + _IO_wsetg (f, f->_wide_data->_IO_buf_base, + f->_wide_data->_IO_buf_base, f->_wide_data->_IO_buf_base); + } + else + { + /* Otherwise must be currently reading. If _IO_read_ptr + (and hence also _IO_read_end) is at the buffer end, + logically slide the buffer forwards one block (by setting + the read pointers to all point at the beginning of the + block). This makes room for subsequent output. + Otherwise, set the read pointers to _IO_read_end (leaving + that alone, so it can continue to correspond to the + external position). */ + if (f->_wide_data->_IO_read_ptr == f->_wide_data->_IO_buf_end) + { + f->_IO_read_end = f->_IO_read_ptr = f->_IO_buf_base; + f->_wide_data->_IO_read_end = f->_wide_data->_IO_read_ptr = + f->_wide_data->_IO_buf_base; + } + } + f->_wide_data->_IO_write_ptr = f->_wide_data->_IO_read_ptr; + f->_wide_data->_IO_write_base = f->_wide_data->_IO_write_ptr; + f->_wide_data->_IO_write_end = f->_wide_data->_IO_buf_end; + f->_wide_data->_IO_read_base = f->_wide_data->_IO_read_ptr = + f->_wide_data->_IO_read_end; + + f->_flags |= _IO_CURRENTLY_PUTTING; + if (f->_flags & (_IO_LINE_BUF+_IO_UNBUFFERED)) + f->_wide_data->_IO_write_end = f->_wide_data->_IO_write_ptr; + } + if (wch == WEOF) + return _IO_do_flush (f); + if (f->_wide_data->_IO_write_ptr == f->_wide_data->_IO_buf_end ) + /* Buffer is really full */ + if (_IO_do_flush (f) == WEOF) + return WEOF; + *f->_wide_data->_IO_write_ptr++ = wch; + if ((f->_flags & _IO_UNBUFFERED) + || ((f->_flags & _IO_LINE_BUF) && wch == L'\n')) + if (_IO_do_flush (f) == WEOF) + return WEOF; + return wch; +} + +wint_t +_IO_wfile_sync (fp) + _IO_FILE *fp; +{ + _IO_ssize_t delta; + wint_t retval = 0; + + /* char* ptr = cur_ptr(); */ + if (fp->_wide_data->_IO_write_ptr > fp->_wide_data->_IO_write_base) + if (_IO_do_flush (fp)) + return WEOF; + delta = fp->_wide_data->_IO_read_ptr - fp->_wide_data->_IO_read_end; + if (delta != 0) + { + /* We have to find out how many bytes we have to go back in the + external buffer. */ + struct _IO_codecvt *cv = &fp->_wide_data->_codecvt; + _IO_off64_t new_pos; + + int clen = (*cv->__codecvt_do_encoding) (cv); + + if (clen > 0) + /* It is easy, a fixed number of input bytes are used for each + wide character. */ + delta *= clen; + else + { + /* We have to find out the hard way how much to back off. + To do this we determine how much input we needed to + generate the wide characters up to the current reading + position. */ + int nread; + + fp->_wide_data->_IO_state = fp->_wide_data->_IO_last_state; + nread = (*cv->__codecvt_do_length) (cv, &fp->_wide_data->_IO_state, + fp->_IO_read_base, + fp->_IO_read_end, delta); + fp->_IO_read_ptr = fp->_IO_read_base + nread; + delta = -(fp->_IO_read_end - fp->_IO_read_base - nread); + } + + new_pos = _IO_SYSSEEK (fp, delta, 1); + if (new_pos != (_IO_off64_t) EOF) + { + fp->_wide_data->_IO_read_end = fp->_wide_data->_IO_read_ptr; + fp->_IO_read_end = fp->_IO_read_ptr; + } +#ifdef ESPIPE + else if (errno == ESPIPE) + ; /* Ignore error from unseekable devices. */ +#endif + else + retval = WEOF; + } + if (retval != WEOF) + fp->_offset = _IO_pos_BAD; + /* FIXME: Cleanup - can this be shared? */ + /* setg(base(), ptr, ptr); */ + return retval; +} + +_IO_off64_t +_IO_wfile_seekoff (fp, offset, dir, mode) + _IO_FILE *fp; + _IO_off64_t offset; + int dir; + int mode; +{ + _IO_off64_t result; + _IO_off64_t delta, new_offset; + long int count; + /* POSIX.1 8.2.3.7 says that after a call the fflush() the file + offset of the underlying file must be exact. */ + int must_be_exact = ((fp->_wide_data->_IO_read_base + == fp->_wide_data->_IO_read_end) + && (fp->_wide_data->_IO_write_base + == fp->_wide_data->_IO_write_ptr)); + + if (mode == 0) + dir = _IO_seek_cur, offset = 0; /* Don't move any pointers. */ + + /* Flush unwritten characters. + (This may do an unneeded write if we seek within the buffer. + But to be able to switch to reading, we would need to set + egptr to ptr. That can't be done in the current design, + which assumes file_ptr() is eGptr. Anyway, since we probably + end up flushing when we close(), it doesn't make much difference.) + FIXME: simulate mem-papped files. */ + + if (fp->_wide_data->_IO_write_ptr > fp->_wide_data->_IO_write_base + || _IO_in_put_mode (fp)) + if (_IO_switch_to_wget_mode (fp)) + return WEOF; + + if (fp->_wide_data->_IO_buf_base == NULL) + { + /* It could be that we already have a pushback buffer. */ + if (fp->_wide_data->_IO_read_base != NULL) + { + free (fp->_wide_data->_IO_read_base); + fp->_flags &= ~_IO_IN_BACKUP; + } + _IO_doallocbuf (fp); + _IO_setp (fp, fp->_IO_buf_base, fp->_IO_buf_base); + _IO_setg (fp, fp->_IO_buf_base, fp->_IO_buf_base, fp->_IO_buf_base); + _IO_wsetp (fp, fp->_wide_data->_IO_buf_base, + fp->_wide_data->_IO_buf_base); + _IO_wsetg (fp, fp->_wide_data->_IO_buf_base, + fp->_wide_data->_IO_buf_base, fp->_wide_data->_IO_buf_base); + } + + switch (dir) + { + struct _IO_codecvt *cv; + int clen; + + case _IO_seek_cur: + /* Adjust for read-ahead (bytes is buffer). To do this we must + find out which position in the external buffer corresponds to + the current position in the internal buffer. */ + cv = &fp->_wide_data->_codecvt; + clen = (*cv->__codecvt_do_encoding) (cv); + + if (clen > 0) + offset -= (fp->_wide_data->_IO_read_end + - fp->_wide_data->_IO_read_ptr) * clen; + else + { + int nread; + + delta = fp->_wide_data->_IO_read_ptr - fp->_wide_data->_IO_read_end; + fp->_wide_data->_IO_state = fp->_wide_data->_IO_last_state; + nread = (*cv->__codecvt_do_length) (cv, &fp->_wide_data->_IO_state, + fp->_IO_read_base, + fp->_IO_read_end, delta); + fp->_IO_read_ptr = fp->_IO_read_base + nread; + offset -= fp->_IO_read_end - fp->_IO_read_base - nread; + } + + if (fp->_offset == _IO_pos_BAD) + goto dumb; + /* Make offset absolute, assuming current pointer is file_ptr(). */ + offset += fp->_offset; + + dir = _IO_seek_set; + break; + case _IO_seek_set: + break; + case _IO_seek_end: + { + struct _G_stat64 st; + if (_IO_SYSSTAT (fp, &st) == 0 && S_ISREG (st.st_mode)) + { + offset += st.st_size; + dir = _IO_seek_set; + } + else + goto dumb; + } + } + /* At this point, dir==_IO_seek_set. */ + + /* If we are only interested in the current position we've found it now. */ + if (mode == 0) + return offset; + + /* If destination is within current buffer, optimize: */ + if (fp->_offset != _IO_pos_BAD && fp->_IO_read_base != NULL + && !_IO_in_backup (fp)) + { + /* Offset relative to start of main get area. */ + _IO_off64_t rel_offset = (offset - fp->_offset + + (fp->_IO_read_end - fp->_IO_read_base)); + if (rel_offset >= 0) + { +#if 0 + if (_IO_in_backup (fp)) + _IO_switch_to_main_get_area (fp); +#endif + if (rel_offset <= fp->_IO_read_end - fp->_IO_read_base) + { + fp->_IO_read_ptr = fp->_IO_read_base + rel_offset; + _IO_setp (fp, fp->_IO_buf_base, fp->_IO_buf_base); + + /* Now set the pointer for the internal buffer. This + might be an iterative process. Though the read + pointer is somewhere in the current external buffer + this does not mean we can convert this whole buffer + at once fitting in the internal buffer. */ + do + { + + } + while (0); + + _IO_mask_flags (fp, 0, _IO_EOF_SEEN); + goto resync; + } +#ifdef TODO + /* If we have streammarkers, seek forward by reading ahead. */ + if (_IO_have_markers (fp)) + { + int to_skip = rel_offset + - (fp->_IO_read_ptr - fp->_IO_read_base); + if (ignore (to_skip) != to_skip) + goto dumb; + _IO_mask_flags (fp, 0, _IO_EOF_SEEN); + goto resync; + } +#endif + } +#ifdef TODO + if (rel_offset < 0 && rel_offset >= Bbase () - Bptr ()) + { + if (!_IO_in_backup (fp)) + _IO_switch_to_backup_area (fp); + gbump (fp->_IO_read_end + rel_offset - fp->_IO_read_ptr); + _IO_mask_flags (fp, 0, _IO_EOF_SEEN); + goto resync; + } +#endif + } + +#ifdef TODO + _IO_unsave_markers (fp); +#endif + + if (fp->_flags & _IO_NO_READS) + goto dumb; + + /* Try to seek to a block boundary, to improve kernel page management. */ + new_offset = offset & ~(fp->_IO_buf_end - fp->_IO_buf_base - 1); + delta = offset - new_offset; + if (delta > fp->_IO_buf_end - fp->_IO_buf_base) + { + new_offset = offset; + delta = 0; + } + result = _IO_SYSSEEK (fp, new_offset, 0); + if (result < 0) + return EOF; + if (delta == 0) + count = 0; + else + { + count = _IO_SYSREAD (fp, fp->_IO_buf_base, + (must_be_exact + ? delta : fp->_IO_buf_end - fp->_IO_buf_base)); + if (count < delta) + { + /* We weren't allowed to read, but try to seek the remainder. */ + offset = count == EOF ? delta : delta-count; + dir = _IO_seek_cur; + goto dumb; + } + } + _IO_setg (fp, fp->_IO_buf_base, fp->_IO_buf_base + delta, + fp->_IO_buf_base + count); + _IO_setp (fp, fp->_IO_buf_base, fp->_IO_buf_base); + fp->_offset = result + count; + _IO_mask_flags (fp, 0, _IO_EOF_SEEN); + return offset; + dumb: + + _IO_unsave_markers (fp); + result = _IO_SYSSEEK (fp, offset, dir); + if (result != EOF) + { + _IO_mask_flags (fp, 0, _IO_EOF_SEEN); + fp->_offset = result; + _IO_setg (fp, fp->_IO_buf_base, fp->_IO_buf_base, fp->_IO_buf_base); + _IO_setp (fp, fp->_IO_buf_base, fp->_IO_buf_base); + } + return result; + +resync: + /* We need to do it since it is possible that the file offset in + the kernel may be changed behind our back. It may happen when + we fopen a file and then do a fork. One process may access the + the file and the kernel file offset will be changed. */ + if (fp->_offset >= 0) + _IO_SYSSEEK (fp, fp->_offset, 0); + + return offset; +} + + +_IO_size_t +_IO_wfile_xsputn (f, data, n) + _IO_FILE *f; + const void *data; + _IO_size_t n; +{ + register const wchar_t *s = (const wchar_t *) data; + _IO_size_t to_do = n; + int must_flush = 0; + _IO_size_t count; + + if (n <= 0) + return 0; + /* This is an optimized implementation. + If the amount to be written straddles a block boundary + (or the filebuf is unbuffered), use sys_write directly. */ + + /* First figure out how much space is available in the buffer. */ + count = f->_wide_data->_IO_write_end - f->_wide_data->_IO_write_ptr; + if ((f->_flags & _IO_LINE_BUF) && (f->_flags & _IO_CURRENTLY_PUTTING)) + { + count = f->_wide_data->_IO_buf_end - f->_wide_data->_IO_write_ptr; + if (count >= n) + { + register const wchar_t *p; + for (p = s + n; p > s; ) + { + if (*--p == L'\n') + { + count = p - s + 1; + must_flush = 1; + break; + } + } + } + } + /* Then fill the buffer. */ + if (count > 0) + { + if (count > to_do) + count = to_do; + if (count > 20) + { +#ifdef _LIBC + f->_wide_data->_IO_write_ptr = + __wmempcpy (f->_wide_data->_IO_write_ptr, s, count); +#else + wmemcpy (f->_wide_data->_IO_write_ptr, s, count); + f->_wide_data->_IO_write_ptr += count; +#endif + s += count; + } + else + { + register wchar_t *p = f->_wide_data->_IO_write_ptr; + register int i = (int) count; + while (--i >= 0) + *p++ = *s++; + f->_wide_data->_IO_write_ptr = p; + } + to_do -= count; + } + if (to_do > 0) + to_do -= _IO_wdefault_xsputn (f, s, to_do); + if (must_flush + && f->_wide_data->_IO_write_ptr != f->_wide_data->_IO_write_base) + _IO_wdo_write (f, f->_wide_data->_IO_write_base, + f->_wide_data->_IO_write_ptr + - f->_wide_data->_IO_write_base); + + return n - to_do; +} + + +struct _IO_jump_t _IO_wfile_jumps = +{ + JUMP_INIT_DUMMY, + JUMP_INIT(finish, _IO_new_file_finish), + JUMP_INIT(overflow, (_IO_overflow_t) _IO_wfile_overflow), + JUMP_INIT(underflow, (_IO_underflow_t) _IO_wfile_underflow), + JUMP_INIT(uflow, (_IO_underflow_t) _IO_wdefault_uflow), + JUMP_INIT(pbackfail, (_IO_pbackfail_t) _IO_wdefault_pbackfail), + JUMP_INIT(xsputn, _IO_wfile_xsputn), + JUMP_INIT(xsgetn, _IO_file_xsgetn), + JUMP_INIT(seekoff, _IO_wfile_seekoff), + JUMP_INIT(seekpos, _IO_default_seekpos), + JUMP_INIT(setbuf, _IO_new_file_setbuf), + JUMP_INIT(sync, (_IO_sync_t) _IO_wfile_sync), + JUMP_INIT(doallocate, _IO_wfile_doallocate), + JUMP_INIT(read, _IO_file_read), + JUMP_INIT(write, _IO_new_file_write), + JUMP_INIT(seek, _IO_file_seek), + JUMP_INIT(close, _IO_file_close), + JUMP_INIT(stat, _IO_file_stat), + JUMP_INIT(showmanyc, _IO_default_showmanyc), + JUMP_INIT(imbue, _IO_default_imbue) +}; diff --git a/libstdc++-v3/libio/wgenops.c b/libstdc++-v3/libio/wgenops.c new file mode 100644 index 000000000000..22a38f01ad7e --- /dev/null +++ b/libstdc++-v3/libio/wgenops.c @@ -0,0 +1,750 @@ +/* Copyright (C) 1993, 1995, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. + This file is part of the GNU IO Library. + Written by Ulrich Drepper . + Based on the single byte version by Per Bothner . + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2, or (at + your option) any later version. + + This library is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, Boston, + MA 02111-1307, USA. + + As a special exception, if you link this library with files + compiled with a GNU compiler to produce an executable, this does + not cause the resulting executable to be covered by the GNU General + Public License. This exception does not however invalidate any + other reasons why the executable file might be covered by the GNU + General Public License. */ + +/* Generic or default I/O operations. */ + +#include "libioP.h" +#ifdef __STDC__ +#include +#endif +#include +#include + + +#ifndef _LIBC +# define __wmemcpy(dst, src, n) wmemcpy (dst, src, n) +#endif + +static int save_for_wbackup __P ((_IO_FILE *fp, wchar_t *end_p)) +#ifdef _LIBC + internal_function +#endif + ; + +/* Return minimum _pos markers + Assumes the current get area is the main get area. */ +_IO_ssize_t _IO_least_wmarker __P ((_IO_FILE *fp, wchar_t *end_p)); + +_IO_ssize_t +_IO_least_wmarker (fp, end_p) + _IO_FILE *fp; + wchar_t *end_p; +{ + _IO_ssize_t least_so_far = end_p - fp->_wide_data->_IO_read_base; + struct _IO_marker *mark; + for (mark = fp->_markers; mark != NULL; mark = mark->_next) + if (mark->_pos < least_so_far) + least_so_far = mark->_pos; + return least_so_far; +} + +/* Switch current get area from backup buffer to (start of) main get area. */ +void +_IO_switch_to_main_wget_area (fp) + _IO_FILE *fp; +{ + wchar_t *tmp; + fp->_flags &= ~_IO_IN_BACKUP; + /* Swap _IO_read_end and _IO_save_end. */ + tmp = fp->_wide_data->_IO_read_end; + fp->_wide_data->_IO_read_end = fp->_wide_data->_IO_save_end; + fp->_wide_data->_IO_save_end= tmp; + /* Swap _IO_read_base and _IO_save_base. */ + tmp = fp->_wide_data->_IO_read_base; + fp->_wide_data->_IO_read_base = fp->_wide_data->_IO_save_base; + fp->_wide_data->_IO_save_base = tmp; + /* Set _IO_read_ptr. */ + fp->_wide_data->_IO_read_ptr = fp->_wide_data->_IO_read_base; +} + + +/* Switch current get area from main get area to (end of) backup area. */ +void +_IO_switch_to_wbackup_area (fp) + _IO_FILE *fp; +{ + wchar_t *tmp; + fp->_flags |= _IO_IN_BACKUP; + /* Swap _IO_read_end and _IO_save_end. */ + tmp = fp->_wide_data->_IO_read_end; + fp->_wide_data->_IO_read_end = fp->_wide_data->_IO_save_end; + fp->_wide_data->_IO_save_end = tmp; + /* Swap _IO_read_base and _IO_save_base. */ + tmp = fp->_wide_data->_IO_read_base; + fp->_wide_data->_IO_read_base = fp->_wide_data->_IO_save_base; + fp->_wide_data->_IO_save_base = tmp; + /* Set _IO_read_ptr. */ + fp->_wide_data->_IO_read_ptr = fp->_wide_data->_IO_read_end; +} + + +void +_IO_wsetb (f, b, eb, a) + _IO_FILE *f; + wchar_t *b; + wchar_t *eb; + int a; +{ + if (f->_wide_data->_IO_buf_base && !(f->_flags & _IO_USER_BUF)) + FREE_BUF (f->_wide_data->_IO_buf_base, _IO_wblen (f)); + f->_wide_data->_IO_buf_base = b; + f->_wide_data->_IO_buf_end = eb; + if (a) + f->_flags &= ~_IO_USER_BUF; + else + f->_flags |= _IO_USER_BUF; +} + + +wint_t +_IO_wdefault_pbackfail (fp, c) + _IO_FILE *fp; + wint_t c; +{ + if (fp->_wide_data->_IO_read_ptr > fp->_wide_data->_IO_read_base + && !_IO_in_backup (fp) + && (wint_t) fp->_IO_read_ptr[-1] == c) + --fp->_IO_read_ptr; + else + { + /* Need to handle a filebuf in write mode (switch to read mode). FIXME!*/ + if (!_IO_in_backup (fp)) + { + /* We need to keep the invariant that the main get area + logically follows the backup area. */ + if (fp->_wide_data->_IO_read_ptr > fp->_wide_data->_IO_read_base + && _IO_have_wbackup (fp)) + { + if (save_for_wbackup (fp, fp->_wide_data->_IO_read_ptr)) + return WEOF; + } + else if (!_IO_have_wbackup (fp)) + { + /* No backup buffer: allocate one. */ + /* Use nshort buffer, if unused? (probably not) FIXME */ + int backup_size = 128; + wchar_t *bbuf = (wchar_t *) malloc (backup_size + * sizeof (wchar_t)); + if (bbuf == NULL) + return WEOF; + fp->_wide_data->_IO_save_base = bbuf; + fp->_wide_data->_IO_save_end = (fp->_wide_data->_IO_save_base + + backup_size); + fp->_wide_data->_IO_backup_base = fp->_wide_data->_IO_save_end; + } + fp->_wide_data->_IO_read_base = fp->_wide_data->_IO_read_ptr; + _IO_switch_to_wbackup_area (fp); + } + else if (fp->_wide_data->_IO_read_ptr <= fp->_wide_data->_IO_read_base) + { + /* Increase size of existing backup buffer. */ + _IO_size_t new_size; + _IO_size_t old_size = (fp->_wide_data->_IO_read_end + - fp->_wide_data->_IO_read_base); + wchar_t *new_buf; + new_size = 2 * old_size; + new_buf = (wchar_t *) malloc (new_size * sizeof (wchar_t)); + if (new_buf == NULL) + return WEOF; + __wmemcpy (new_buf + (new_size - old_size), + fp->_wide_data->_IO_read_base, old_size); + free (fp->_wide_data->_IO_read_base); + _IO_wsetg (fp, new_buf, new_buf + (new_size - old_size), + new_buf + new_size); + fp->_wide_data->_IO_backup_base = fp->_wide_data->_IO_read_ptr; + } + + *--fp->_wide_data->_IO_read_ptr = c; + } + return c; +} + + +void +_IO_wdefault_finish (fp, dummy) + _IO_FILE *fp; + int dummy; +{ + struct _IO_marker *mark; + if (fp->_wide_data->_IO_buf_base && !(fp->_flags & _IO_USER_BUF)) + { + FREE_BUF (fp->_wide_data->_IO_buf_base, + _IO_wblen (fp) * sizeof (wchar_t)); + fp->_wide_data->_IO_buf_base = fp->_wide_data->_IO_buf_end = NULL; + } + + for (mark = fp->_markers; mark != NULL; mark = mark->_next) + mark->_sbuf = NULL; + + if (fp->_IO_save_base) + { + free (fp->_wide_data->_IO_save_base); + fp->_IO_save_base = NULL; + } + +#ifdef _IO_MTSAFE_IO + _IO_lock_fini (*fp->_lock); +#endif + + _IO_un_link ((struct _IO_FILE_plus *) fp); +} + + +wint_t +_IO_wdefault_uflow (fp) + _IO_FILE *fp; +{ + wint_t wch; + wch = _IO_UNDERFLOW (fp); + if (wch == WEOF) + return WEOF; + return *fp->_wide_data->_IO_read_ptr++; +} + + +wint_t +__woverflow (f, wch) + _IO_FILE *f; + wint_t wch; +{ + if (f->_mode == 0) + _IO_fwide (f, 1); + return _IO_OVERFLOW (f, wch); +} + + +wint_t +__wuflow (fp) + _IO_FILE *fp; +{ + if (fp->_mode < 0 || (fp->_mode == 0 && _IO_fwide (fp, 1) != 1)) + return WEOF; + + if (fp->_mode == 0) + _IO_fwide (fp, 1); + if (_IO_in_put_mode (fp)) + if (_IO_switch_to_wget_mode (fp) == EOF) + return WEOF; + if (fp->_wide_data->_IO_read_ptr < fp->_wide_data->_IO_read_end) + return *fp->_wide_data->_IO_read_ptr++; + if (_IO_in_backup (fp)) + { + _IO_switch_to_main_wget_area (fp); + if (fp->_wide_data->_IO_read_ptr < fp->_wide_data->_IO_read_end) + return *fp->_wide_data->_IO_read_ptr++; + } + if (_IO_have_markers (fp)) + { + if (save_for_wbackup (fp, fp->_wide_data->_IO_read_end)) + return WEOF; + } + else if (_IO_have_wbackup (fp)) + _IO_free_wbackup_area (fp); + return _IO_UFLOW (fp); +} + + +wint_t +__wunderflow (fp) + _IO_FILE *fp; +{ + if (fp->_mode < 0 || (fp->_mode == 0 && _IO_fwide (fp, 1) != 1)) + return WEOF; + + if (_IO_in_put_mode (fp)) + if (_IO_switch_to_wget_mode (fp) == EOF) + return WEOF; + if (fp->_wide_data->_IO_read_ptr < fp->_wide_data->_IO_read_end) + return *fp->_wide_data->_IO_read_ptr; + if (_IO_in_backup (fp)) + { + _IO_switch_to_main_wget_area (fp); + if (fp->_wide_data->_IO_read_ptr < fp->_wide_data->_IO_read_end) + return *fp->_wide_data->_IO_read_ptr; + } + if (_IO_have_markers (fp)) + { + if (save_for_wbackup (fp, fp->_wide_data->_IO_read_end)) + return WEOF; + } + else if (_IO_have_backup (fp)) + _IO_free_wbackup_area (fp); + return _IO_UNDERFLOW (fp); +} + + +_IO_size_t +_IO_wdefault_xsputn (f, data, n) + _IO_FILE *f; + const void *data; + _IO_size_t n; +{ + const wchar_t *s = (const wchar_t *) data; + _IO_size_t more = n; + if (more <= 0) + return 0; + for (;;) + { + /* Space available. */ + _IO_ssize_t count = (f->_wide_data->_IO_write_end + - f->_wide_data->_IO_write_ptr); + if (count > 0) + { + if ((_IO_size_t) count > more) + count = more; + if (count > 20) + { +#ifdef _LIBC + f->_wide_data->_IO_write_ptr = + __wmempcpy (f->_wide_data->_IO_write_ptr, s, count); +#else + memcpy (f->_wide_data->_IO_write_ptr, s, count); + f->_wide_data->_IO_write_ptr += count; +#endif + s += count; + } + else if (count <= 0) + count = 0; + else + { + wchar_t *p = f->_wide_data->_IO_write_ptr; + _IO_ssize_t i; + for (i = count; --i >= 0; ) + *p++ = *s++; + f->_wide_data->_IO_write_ptr = p; + } + more -= count; + } + if (more == 0 || __woverflow (f, *s++) == WEOF) + break; + more--; + } + return n - more; +} + + +_IO_size_t +_IO_wdefault_xsgetn (fp, data, n) + _IO_FILE *fp; + void *data; + _IO_size_t n; +{ + _IO_size_t more = n; + wchar_t *s = (wchar_t*) data; + for (;;) + { + /* Data available. */ + _IO_ssize_t count = (fp->_wide_data->_IO_read_end + - fp->_wide_data->_IO_read_ptr); + if (count > 0) + { + if ((_IO_size_t) count > more) + count = more; + if (count > 20) + { +#ifdef _LIBC + s = __wmempcpy (s, fp->_wide_data->_IO_read_ptr, count); +#else + memcpy (s, fp->_wide_data->_IO_read_ptr, count); + s += count; +#endif + fp->_wide_data->_IO_read_ptr += count; + } + else if (count <= 0) + count = 0; + else + { + wchar_t *p = fp->_wide_data->_IO_read_ptr; + int i = (int) count; + while (--i >= 0) + *s++ = *p++; + fp->_wide_data->_IO_read_ptr = p; + } + more -= count; + } + if (more == 0 || __wunderflow (fp) == WEOF) + break; + } + return n - more; +} + + +void +_IO_wdoallocbuf (fp) + _IO_FILE *fp; +{ + if (fp->_wide_data->_IO_buf_base) + return; + if (!(fp->_flags & _IO_UNBUFFERED)) + if (_IO_DOALLOCATE (fp) != WEOF) + return; + _IO_wsetb (fp, fp->_wide_data->_shortbuf, fp->_wide_data->_shortbuf + 1, 0); +} + + +_IO_FILE * +_IO_wdefault_setbuf (fp, p, len) + _IO_FILE *fp; + wchar_t *p; + _IO_ssize_t len; +{ + if (_IO_SYNC (fp) == EOF) + return NULL; + if (p == NULL || len == 0) + { + fp->_flags |= _IO_UNBUFFERED; + _IO_wsetb (fp, fp->_wide_data->_shortbuf, fp->_wide_data->_shortbuf + 1, + 0); + } + else + { + fp->_flags &= ~_IO_UNBUFFERED; + _IO_wsetb (fp, p, p + len, 0); + } + fp->_wide_data->_IO_write_base = fp->_wide_data->_IO_write_ptr + = fp->_wide_data->_IO_write_end = 0; + fp->_wide_data->_IO_read_base = fp->_wide_data->_IO_read_ptr + = fp->_wide_data->_IO_read_end = 0; + return fp; +} + + +int +_IO_wdefault_doallocate (fp) + _IO_FILE *fp; +{ + wchar_t *buf; + + ALLOC_WBUF (buf, _IO_BUFSIZ, EOF); + _IO_wsetb (fp, buf, buf + _IO_BUFSIZ, 1); + return 1; +} + + +int +_IO_switch_to_wget_mode (fp) + _IO_FILE *fp; +{ + if (fp->_wide_data->_IO_write_ptr > fp->_wide_data->_IO_write_base) + if (_IO_OVERFLOW (fp, WEOF) == WEOF) + return EOF; + if (_IO_in_backup (fp)) + fp->_wide_data->_IO_read_base = fp->_wide_data->_IO_backup_base; + else + { + fp->_wide_data->_IO_read_base = fp->_wide_data->_IO_buf_base; + if (fp->_wide_data->_IO_write_ptr > fp->_wide_data->_IO_read_end) + fp->_wide_data->_IO_read_end = fp->_wide_data->_IO_write_ptr; + } + fp->_wide_data->_IO_read_ptr = fp->_wide_data->_IO_write_ptr; + + fp->_wide_data->_IO_write_base = fp->_wide_data->_IO_write_ptr + = fp->_wide_data->_IO_write_end = fp->_wide_data->_IO_read_ptr; + + fp->_flags &= ~_IO_CURRENTLY_PUTTING; + return 0; +} + +void +_IO_free_wbackup_area (fp) + _IO_FILE *fp; +{ + if (_IO_in_backup (fp)) + _IO_switch_to_main_wget_area (fp); /* Just in case. */ + free (fp->_wide_data->_IO_save_base); + fp->_wide_data->_IO_save_base = NULL; + fp->_wide_data->_IO_save_end = NULL; + fp->_wide_data->_IO_backup_base = NULL; +} + +#if 0 +int +_IO_switch_to_wput_mode (fp) + _IO_FILE *fp; +{ + fp->_wide_data->_IO_write_base = fp->_wide_data->_IO_read_ptr; + fp->_wide_data->_IO_write_ptr = fp->_wide_data->_IO_read_ptr; + /* Following is wrong if line- or un-buffered? */ + fp->_wide_data->_IO_write_end = (fp->_flags & _IO_IN_BACKUP + ? fp->_wide_data->_IO_read_end + : fp->_wide_data->_IO_buf_end); + + fp->_wide_data->_IO_read_ptr = fp->_wide_data->_IO_read_end; + fp->_wide_data->_IO_read_base = fp->_wide_data->_IO_read_end; + + fp->_flags |= _IO_CURRENTLY_PUTTING; + return 0; +} +#endif + + +static int +#ifdef _LIBC +internal_function +#endif +save_for_wbackup (fp, end_p) + _IO_FILE *fp; + wchar_t *end_p; +{ + /* Append [_IO_read_base..end_p] to backup area. */ + _IO_ssize_t least_mark = _IO_least_wmarker (fp, end_p); + /* needed_size is how much space we need in the backup area. */ + _IO_size_t needed_size = ((end_p - fp->_wide_data->_IO_read_base) + - least_mark); + /* FIXME: Dubious arithmetic if pointers are NULL */ + _IO_size_t current_Bsize = (fp->_wide_data->_IO_save_end + - fp->_wide_data->_IO_save_base); + _IO_size_t avail; /* Extra space available for future expansion. */ + _IO_ssize_t delta; + struct _IO_marker *mark; + if (needed_size > current_Bsize) + { + wchar_t *new_buffer; + avail = 100; + new_buffer = (wchar_t *) malloc ((avail + needed_size) + * sizeof (wchar_t)); + if (new_buffer == NULL) + return EOF; /* FIXME */ + if (least_mark < 0) + { +#ifdef _LIBC + __wmempcpy (__wmempcpy (new_buffer + avail, + fp->_wide_data->_IO_save_end + least_mark, + -least_mark), + fp->_wide_data->_IO_read_base, + end_p - fp->_wide_data->_IO_read_base); +#else + memcpy (new_buffer + avail, + fp->_wide_data->_IO_save_end + least_mark, + -least_mark * sizeof (wchar_t)); + memcpy (new_buffer + avail - least_mark, + fp->_wide_data->_IO_read_base, + (end_p - fp->_wide_data->_IO_read_base) * sizeof (wchar_t)); +#endif + } + else + { +#ifdef _LIBC + __wmemcpy (new_buffer + avail, + fp->_wide_data->_IO_read_base + least_mark, + needed_size); +#else + memcpy (new_buffer + avail, + fp->_wide_data->_IO_read_base + least_mark, + needed_size * sizeof (wchar_t)); +#endif + } + if (fp->_wide_data->_IO_save_base) + free (fp->_wide_data->_IO_save_base); + fp->_wide_data->_IO_save_base = new_buffer; + fp->_wide_data->_IO_save_end = new_buffer + avail + needed_size; + } + else + { + avail = current_Bsize - needed_size; + if (least_mark < 0) + { +#ifdef _LIBC + __wmemmove (fp->_wide_data->_IO_save_base + avail, + fp->_wide_data->_IO_save_end + least_mark, + -least_mark); + __wmemcpy (fp->_wide_data->_IO_save_base + avail - least_mark, + fp->_wide_data->_IO_read_base, + end_p - fp->_wide_data->_IO_read_base); +#else + memmove (fp->_wide_data->_IO_save_base + avail, + fp->_wide_data->_IO_save_end + least_mark, + -least_mark * sizeof (wchar_t)); + memcpy (fp->_wide_data->_IO_save_base + avail - least_mark, + fp->_wide_data->_IO_read_base, + (end_p - fp->_wide_data->_IO_read_base) * sizeof (wchar_t)); +#endif + } + else if (needed_size > 0) +#ifdef _LIBC + __wmemcpy (fp->_wide_data->_IO_save_base + avail, + fp->_wide_data->_IO_read_base + least_mark, + needed_size); +#else + memcpy (fp->_wide_data->_IO_save_base + avail, + fp->_wide_data->_IO_read_base + least_mark, + needed_size * sizeof (wchar_t)); +#endif + } + fp->_wide_data->_IO_backup_base = fp->_wide_data->_IO_save_base + avail; + /* Adjust all the streammarkers. */ + delta = end_p - fp->_wide_data->_IO_read_base; + for (mark = fp->_markers; mark != NULL; mark = mark->_next) + mark->_pos -= delta; + return 0; +} + +wint_t +_IO_sputbackwc (fp, c) + _IO_FILE *fp; + wint_t c; +{ + wint_t result; + + if (fp->_wide_data->_IO_read_ptr > fp->_wide_data->_IO_read_base + && (wchar_t)fp->_wide_data->_IO_read_ptr[-1] == (wchar_t) c) + { + fp->_wide_data->_IO_read_ptr--; + result = c; + } + else + result = _IO_PBACKFAIL (fp, c); + + if (result != EOF) + fp->_flags &= ~_IO_EOF_SEEN; + + return result; +} + +wint_t +_IO_sungetwc (fp) + _IO_FILE *fp; +{ + int result; + + if (fp->_wide_data->_IO_read_ptr > fp->_wide_data->_IO_read_base) + { + fp->_wide_data->_IO_read_ptr--; + result = *fp->_wide_data->_IO_read_ptr; + } + else + result = _IO_PBACKFAIL (fp, EOF); + + if (result != WEOF) + fp->_flags &= ~_IO_EOF_SEEN; + + return result; +} + + +unsigned +_IO_adjust_wcolumn (start, line, count) + unsigned start; + const wchar_t *line; + int count; +{ + const wchar_t *ptr = line + count; + while (ptr > line) + if (*--ptr == L'\n') + return line + count - ptr - 1; + return start + count; +} + +void +_IO_init_wmarker (marker, fp) + struct _IO_marker *marker; + _IO_FILE *fp; +{ + marker->_sbuf = fp; + if (_IO_in_put_mode (fp)) + _IO_switch_to_wget_mode (fp); + if (_IO_in_backup (fp)) + marker->_pos = fp->_wide_data->_IO_read_ptr - fp->_wide_data->_IO_read_end; + else + marker->_pos = (fp->_wide_data->_IO_read_ptr + - fp->_wide_data->_IO_read_base); + + /* Should perhaps sort the chain? */ + marker->_next = fp->_markers; + fp->_markers = marker; +} + +#define BAD_DELTA EOF + +/* Return difference between MARK and current position of MARK's stream. */ +int +_IO_wmarker_delta (mark) + struct _IO_marker *mark; +{ + int cur_pos; + if (mark->_sbuf == NULL) + return BAD_DELTA; + if (_IO_in_backup (mark->_sbuf)) + cur_pos = (mark->_sbuf->_wide_data->_IO_read_ptr + - mark->_sbuf->_wide_data->_IO_read_end); + else + cur_pos = (mark->_sbuf->_wide_data->_IO_read_ptr + - mark->_sbuf->_wide_data->_IO_read_base); + return mark->_pos - cur_pos; +} + +int +_IO_seekwmark (fp, mark, delta) + _IO_FILE *fp; + struct _IO_marker *mark; + int delta; +{ + if (mark->_sbuf != fp) + return EOF; + if (mark->_pos >= 0) + { + if (_IO_in_backup (fp)) + _IO_switch_to_main_wget_area (fp); + fp->_wide_data->_IO_read_ptr = (fp->_wide_data->_IO_read_base + + mark->_pos); + } + else + { + if (!_IO_in_backup (fp)) + _IO_switch_to_wbackup_area (fp); + fp->_wide_data->_IO_read_ptr = fp->_wide_data->_IO_read_end + mark->_pos; + } + return 0; +} + +void +_IO_unsave_wmarkers (fp) + _IO_FILE *fp; +{ + struct _IO_marker *mark = fp->_markers; + if (mark) + { +#ifdef TODO + streampos offset = seekoff (0, ios::cur, ios::in); + if (offset != EOF) + { + offset += eGptr () - Gbase (); + for ( ; mark != NULL; mark = mark->_next) + mark->set_streampos (mark->_pos + offset); + } + else + { + for ( ; mark != NULL; mark = mark->_next) + mark->set_streampos (EOF); + } +#endif + fp->_markers = 0; + } + + if (_IO_have_backup (fp)) + _IO_free_wbackup_area (fp); +} diff --git a/libstdc++-v3/math/cargl.c b/libstdc++-v3/math/cargl.c index f99ad330d88c..ede84a1c854b 100644 --- a/libstdc++-v3/math/cargl.c +++ b/libstdc++-v3/math/cargl.c @@ -34,5 +34,5 @@ long double cargl (__complex__ long double x) { - return __atan2l (__imag__ x, __real__ x); + return atan2l (__imag__ x, __real__ x); } diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am index a6b7d5bf97d5..07036c4bb4c9 100644 --- a/libstdc++-v3/src/Makefile.am +++ b/libstdc++-v3/src/Makefile.am @@ -52,7 +52,7 @@ AC_CXXFLAGS = \ # the end of the compile line so that -O2 can be overridden as the # occasion call for it. (ie, --enable-debug) AM_CXXFLAGS = \ - -fno-implicit-templates $(OPTIMIZE_CXXFLAGS) \ + -D_GNU_SOURCE -fno-implicit-templates $(OPTIMIZE_CXXFLAGS) \ -Wall -Wno-format -W -Wwrite-strings -Winline \ $(AC_CXXFLAGS) diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in index 4b4a4b796ac2..e3e9954fec37 100644 --- a/libstdc++-v3/src/Makefile.in +++ b/libstdc++-v3/src/Makefile.in @@ -130,7 +130,7 @@ AC_CXXFLAGS = \ # the end of the compile line so that -O2 can be overridden as the # occasion call for it. (ie, --enable-debug) AM_CXXFLAGS = \ - -fno-implicit-templates $(OPTIMIZE_CXXFLAGS) \ + -D_GNU_SOURCE -fno-implicit-templates $(OPTIMIZE_CXXFLAGS) \ -Wall -Wno-format -W -Wwrite-strings -Winline \ $(AC_CXXFLAGS)