diff options
-rw-r--r-- | libstdc++-v3/ChangeLog | 14 | ||||
-rw-r--r-- | libstdc++-v3/config.h.in | 3 | ||||
-rw-r--r-- | libstdc++-v3/config/c_io_libio_codecvt.c | 16 | ||||
-rw-r--r-- | libstdc++-v3/config/os/solaris/solaris2.7/bits/ctype_noninline.h | 2 | ||||
-rwxr-xr-x | libstdc++-v3/configure | 52 | ||||
-rw-r--r-- | libstdc++-v3/configure.in | 1 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/locale_facets.tcc | 1 | ||||
-rw-r--r-- | libstdc++-v3/libio/_G_config.h | 14 | ||||
-rw-r--r-- | libstdc++-v3/libio/iofwide.c | 20 | ||||
-rw-r--r-- | libstdc++-v3/libio/libio.h | 12 | ||||
-rw-r--r-- | libstdc++-v3/libio/wfileops.c | 4 |
11 files changed, 100 insertions, 39 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index adfd90a..113e7ef 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,17 @@ +2000-10-25 Phil Edwards <pme@sources.redhat.com> + + * configure.in: Check for gconv.h. + * libio/wfileops.c: Wrap gconv.h in HAVE_GCONV_H. + + * config/c_io_libio_codecvt.c: Change __mbstate_t to __c_mbstate_t. + * libio/_G_config.h: And here. + * libio/iofwide.c: And here. + * libio/libio.h: And here. + + * config/os/solaris/solaris2.7/bits/ctype_noninline.h: Remove + exception specification to match declaration. + * include/bits/locale_facets.tcc: Include bits/std_clocale.h. + 2000-10-24 Mark Harig <mharig@landmark.com> * docs/configopts.html: Added documentation for the diff --git a/libstdc++-v3/config.h.in b/libstdc++-v3/config.h.in index 7d59d18..1e1291d 100644 --- a/libstdc++-v3/config.h.in +++ b/libstdc++-v3/config.h.in @@ -624,6 +624,9 @@ /* Define if you have the <fp.h> header file. */ #undef HAVE_FP_H +/* Define if you have the <gconv.h> header file. */ +#undef HAVE_GCONV_H + /* Define if you have the <ieeefp.h> header file. */ #undef HAVE_IEEEFP_H diff --git a/libstdc++-v3/config/c_io_libio_codecvt.c b/libstdc++-v3/config/c_io_libio_codecvt.c index 8407cb9..4fc7fc0 100644 --- a/libstdc++-v3/config/c_io_libio_codecvt.c +++ b/libstdc++-v3/config/c_io_libio_codecvt.c @@ -30,17 +30,17 @@ /* Prototypes of libio's codecvt functions. */ static enum __codecvt_result -do_out(struct _IO_codecvt *codecvt, __mbstate_t *statep, +do_out(struct _IO_codecvt *codecvt, __c_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, +do_unshift(struct _IO_codecvt *codecvt, __c_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, +do_in(struct _IO_codecvt *codecvt, __c_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); @@ -48,7 +48,7 @@ static int do_encoding(struct _IO_codecvt *codecvt); static int -do_length(struct _IO_codecvt *codecvt, __mbstate_t *statep, +do_length(struct _IO_codecvt *codecvt, __c_mbstate_t *statep, const char *from_start, const char *from_end, _IO_size_t max); static int @@ -72,7 +72,7 @@ struct _IO_codecvt __c_libio_codecvt = }; static enum __codecvt_result -do_out(struct _IO_codecvt *codecvt, __mbstate_t *statep, +do_out(struct _IO_codecvt *codecvt, __c_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) @@ -97,7 +97,7 @@ do_out(struct _IO_codecvt *codecvt, __mbstate_t *statep, static enum __codecvt_result -do_unshift(struct _IO_codecvt *codecvt, __mbstate_t *statep, +do_unshift(struct _IO_codecvt *codecvt, __c_mbstate_t *statep, char *to_start, char *to_end, char **to_stop) { *to_stop = to_start; @@ -106,7 +106,7 @@ do_unshift(struct _IO_codecvt *codecvt, __mbstate_t *statep, static enum __codecvt_result -do_in(struct _IO_codecvt *codecvt, __mbstate_t *statep, +do_in(struct _IO_codecvt *codecvt, __c_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) { @@ -140,7 +140,7 @@ do_always_noconv(struct _IO_codecvt *codecvt) static int -do_length(struct _IO_codecvt *codecvt, __mbstate_t *statep, +do_length(struct _IO_codecvt *codecvt, __c_mbstate_t *statep, const char *from_start, const char *from_end, _IO_size_t max) { return from_end - from_start; } diff --git a/libstdc++-v3/config/os/solaris/solaris2.7/bits/ctype_noninline.h b/libstdc++-v3/config/os/solaris/solaris2.7/bits/ctype_noninline.h index 348495e..f5ec171 100644 --- a/libstdc++-v3/config/os/solaris/solaris2.7/bits/ctype_noninline.h +++ b/libstdc++-v3/config/os/solaris/solaris2.7/bits/ctype_noninline.h @@ -34,7 +34,7 @@ // Information as gleaned from /usr/include/ctype.h ctype<char>::ctype(const mask* __table = 0, bool __del = false, - size_t __refs = 0) throw() + size_t __refs = 0) : _Ctype_nois<char>(__refs), _M_del(__table != 0 && __del), _M_toupper(__trans_upper), _M_tolower(__trans_lower), _M_ctable(__ctype_mask), _M_table(__table == 0 ? _M_ctable: __table) diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 1ba903d..d2603a2 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -18570,6 +18570,46 @@ EOF fi + for ac_hdr in gconv.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:18578: 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 +#line 18583 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:18588: \"$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* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + fi @@ -18611,19 +18651,19 @@ fi if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:18615: checking for LC_MESSAGES" >&5 +echo "configure:18655: 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 <<EOF -#line 18620 "configure" +#line 18660 "configure" #include "confdefs.h" #include <locale.h> int main() { return LC_MESSAGES ; return 0; } EOF -if { (eval echo configure:18627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:18667: \"$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 @@ -18660,14 +18700,14 @@ INTERFACE=v3 # Check for the interface version number for specifying where header # files are installed, if a version number is provided. echo $ac_n "checking for interface version number""... $ac_c" 1>&6 -echo "configure:18664: checking for interface version number" >&5 +echo "configure:18704: checking for interface version number" >&5 libstdcxx_interface=$INTERFACE echo "$ac_t""$libstdcxx_interface" 1>&6 # Process the option --with-gxx-include-dir=<path to include-files directory> echo $ac_n "checking for --with-gxx-include-dir""... $ac_c" 1>&6 -echo "configure:18671: checking for --with-gxx-include-dir" >&5 +echo "configure:18711: checking for --with-gxx-include-dir" >&5 # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given. if test "${with_gxx_include_dir+set}" = set; then withval="$with_gxx_include_dir" @@ -18701,7 +18741,7 @@ fi # Process the option "--enable-version-specific-runtime-libs" echo $ac_n "checking for --enable-version-specific-runtime-libs""... $ac_c" 1>&6 -echo "configure:18705: checking for --enable-version-specific-runtime-libs" >&5 +echo "configure:18745: checking for --enable-version-specific-runtime-libs" >&5 # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given. if test "${enable_version_specific_runtime_libs+set}" = set; then enableval="$enable_version_specific_runtime_libs" diff --git a/libstdc++-v3/configure.in b/libstdc++-v3/configure.in index 66df1bf..1ffc0cb 100644 --- a/libstdc++-v3/configure.in +++ b/libstdc++-v3/configure.in @@ -135,6 +135,7 @@ else GLIBCPP_CHECK_CTYPE AC_FUNC_MMAP + AC_CHECK_HEADERS(gconv.h) fi AM_CONDITIONAL(CANADIAN, test "$CANADIAN" = yes) diff --git a/libstdc++-v3/include/bits/locale_facets.tcc b/libstdc++-v3/include/bits/locale_facets.tcc index a268c4e..3a404dd 100644 --- a/libstdc++-v3/include/bits/locale_facets.tcc +++ b/libstdc++-v3/include/bits/locale_facets.tcc @@ -33,6 +33,7 @@ #define _CPP_BITS_LOCFACETS_TCC 1 #include <bits/std_cerrno.h> +#include <bits/std_clocale.h> // For localeconv #include <bits/std_cstdlib.h> // For strof, strtold #include <bits/std_limits.h> // For numeric_limits #include <bits/std_memory.h> // For auto_ptr diff --git a/libstdc++-v3/libio/_G_config.h b/libstdc++-v3/libio/_G_config.h index 98afe0a..4e79f74 100644 --- a/libstdc++-v3/libio/_G_config.h +++ b/libstdc++-v3/libio/_G_config.h @@ -37,15 +37,15 @@ typedef unsigned int wint_t; /* For use as part of glibc (native) or as part of libstdc++ (maybe not glibc) */ -#ifndef __mbstate_t_defined -# define __mbstate_t_defined 1 -# ifdef _GLIBCPP_USE_WCHAR_T +#ifndef __c_mbstate_t_defined +# define __c_mbstate_t_defined 1 +/*# ifdef _GLIBCPP_USE_WCHAR_T*/ typedef struct { int count; wint_t value; -}__mbstate_t; -# endif +}__c_mbstate_t; +/*# endif*/ #endif #undef __need_mbstate_t @@ -56,13 +56,13 @@ typedef size_t _G_size_t; typedef struct { __off_t __pos; - __mbstate_t __state; + __c_mbstate_t __state; } _G_fpos_t; typedef struct { __off64_t __pos; - __mbstate_t __state; + __c_mbstate_t __state; } _G_fpos64_t; #else typedef __off_t _G_fpos_t; diff --git a/libstdc++-v3/libio/iofwide.c b/libstdc++-v3/libio/iofwide.c index 64bc7c9..0ec1182 100644 --- a/libstdc++-v3/libio/iofwide.c +++ b/libstdc++-v3/libio/iofwide.c @@ -41,22 +41,22 @@ /* Prototypes of libio's codecvt functions. */ static enum __codecvt_result do_out (struct _IO_codecvt *codecvt, - __mbstate_t *statep, + __c_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, + __c_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, + __c_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, +static int do_length (struct _IO_codecvt *codecvt, __c_mbstate_t *statep, const char *from_start, const char *from_end, _IO_size_t max); static int do_max_length (struct _IO_codecvt *codecvt); @@ -116,8 +116,8 @@ _IO_fwide (fp, mode) 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)); + memset (&fp->_wide_data->_IO_state, '\0', sizeof (__c_mbstate_t)); + memset (&fp->_wide_data->_IO_last_state, '\0', sizeof (__c_mbstate_t)); __wcsmbs_clone_conv (&fcts); @@ -188,7 +188,7 @@ weak_alias (_IO_fwide, fwide) static enum __codecvt_result -do_out (struct _IO_codecvt *codecvt, __mbstate_t *statep, +do_out (struct _IO_codecvt *codecvt, __c_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) @@ -257,7 +257,7 @@ do_out (struct _IO_codecvt *codecvt, __mbstate_t *statep, static enum __codecvt_result -do_unshift (struct _IO_codecvt *codecvt, __mbstate_t *statep, +do_unshift (struct _IO_codecvt *codecvt, __c_mbstate_t *statep, char *to_start, char *to_end, char **to_stop) { enum __codecvt_result result; @@ -318,7 +318,7 @@ do_unshift (struct _IO_codecvt *codecvt, __mbstate_t *statep, static enum __codecvt_result -do_in (struct _IO_codecvt *codecvt, __mbstate_t *statep, +do_in (struct _IO_codecvt *codecvt, __c_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) { @@ -416,7 +416,7 @@ do_always_noconv (struct _IO_codecvt *codecvt) static int -do_length (struct _IO_codecvt *codecvt, __mbstate_t *statep, +do_length (struct _IO_codecvt *codecvt, __c_mbstate_t *statep, const char *from_start, const char *from_end, _IO_size_t max) { int result; diff --git a/libstdc++-v3/libio/libio.h b/libstdc++-v3/libio/libio.h index e662f48..6fd503e 100644 --- a/libstdc++-v3/libio/libio.h +++ b/libstdc++-v3/libio/libio.h @@ -206,22 +206,22 @@ struct _IO_codecvt { void (*__codecvt_destr) (struct _IO_codecvt *); enum __codecvt_result (*__codecvt_do_out) (struct _IO_codecvt *, - __mbstate_t *, + __c_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 *, + __c_mbstate_t *, char *, char *, char **); enum __codecvt_result (*__codecvt_do_in) (struct _IO_codecvt *, - __mbstate_t *, + __c_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 *, + int (*__codecvt_do_length) (struct _IO_codecvt *, __c_mbstate_t *, const char *, const char *, _IO_size_t); int (*__codecvt_do_max_length) (struct _IO_codecvt *); @@ -247,8 +247,8 @@ struct _IO_wide_data 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; + __c_mbstate_t _IO_state; + __c_mbstate_t _IO_last_state; #endif struct _IO_codecvt _codecvt; diff --git a/libstdc++-v3/libio/wfileops.c b/libstdc++-v3/libio/wfileops.c index f12cb22..376014b 100644 --- a/libstdc++-v3/libio/wfileops.c +++ b/libstdc++-v3/libio/wfileops.c @@ -28,7 +28,9 @@ #include <assert.h> #include <libioP.h> #include <wchar.h> -#include <gconv.h> +#ifdef HAVE_GCONV_H +# include <gconv.h> +#endif #include <stdlib.h> #include <string.h> |